About
This howto shows you how you can generate a list of pages event with the iterator components.
Steps
Open your tag iterator component
In your document, begin by opening your tag component:
<iterator>
Select your pages
Then add your page selection with the page sql.
We select the active page events:
<data>select from pages where date_end >= now order by date_start asc</data>
Define your fragment
Then define your fragment as being:
- with the date_start and date_end formated date of a page event
- with a link created from:
- the path
<fragment>
* from ${date_start | format()} to ${date_end | format()} - [[$path|$title]]
</fragment>
Close your iterator component and save
Write the closing tag and save your page.
</iterator>
The result
You obtain this result on this website.
- from Tuesday, March 12, 2024 to Wednesday, March 20, 2999 - ComboStrap Semantic - Event
Apply your layout
You can use any component to layout your pages.
For instance, you can add them in a grid:
How to generate and layout a list of pages with a grid and their image?