Table of Contents

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:

<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.

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?