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:

This allows the behaviour of each of these lists to be sensibly evaluated in comparison.
 
Beneath the list, the usual sidebar is shown full width, with the Uber List in columns. The Magic Data and template to generate the list is the same as used for the sidebar of other pages.

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!

Th above is listing Uber List pages, but does not require Uber List to work, the list is generated with straight forward Magic Data.

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