A useful snippet from the Uber List pages
If you have been looking through the exciting list capabilities of the Uber List pages, you will have noticed a common bit of text used in many of the example pages:
The list shown here lists the same pages as:
- Addon pages - Plain Uber List
- Addon pages - an Alternate List
- Addon pages - Full Width List with direct loading
- Addon pages - Full Width List with AJAX loading
- Addon pages - Full Width List limited items
- Addon pages - Core Page List with Uber List template
This is a stack pulled in with Universal Content Puller that internally used a snippet of Magic Data to list the grouped examples.
First I created a checkbox page attribute called "Uber List Comparison", added that attribute to each of the example pages and checked it.
Then in the stack I inserted into a content block some Magic Data:
'Uber List' AS_PAGE LIST_PAGES 50 FILTER_LIST ATTRIBUTE "uber_list_comparison" END_FILTER_LIST APPLY_EACH PAGE_LINK END_APPLY_EACH HTML_UL
This expression starts by listing up to 50 pages beneath the 'Uber List' page. The list is then filtered to those with the attribute "uber_list_comparison" checked. Each item of the list is then mapped to a PAGE_LINK and the whole lot formatted as an HTML_UL.
In the Universal Content Puller block I selected to evaluate Magic Data in the Text Processors section. As there is nothing context sensitive in the Magic Data expression, I could equally have evaluated the Magic Data using a content block template.
The result, a minimal inline page list that automatically adapts to the pages in the site map!
If you also have Uber List, version 1.2 adds a fast page listing/filtering symbol. The above could also be written as:
'Uber List' AS_PAGE LIST_ALL_PAGES_WITH_FILTER_CONTAINING 'uber_list_comparison' 1 50 APPLY_EACH PAGE_LINK END_APPLY_EACH HTML_UL
The difference between the two methods becomes important when the list of pages being filtered is very big. With big lists being filtered down to small lists, the LIST_ALL_PAGES_WITH_FILTER_CONTAINING method is considerably faster.
Last updated: over a year ago