====== How can I generate a list of pages? ====== ===== About ===== This [[howto:howto|howto]] shows you how you can generate a [[:docs:lists:list|list]] of pages with the [[:docs:templating:iterator|iterator components]]. ===== Steps ===== ==== Open your tag iterator component ==== In your document, begin by opening your tag compeonent: ==== Select your pages ==== Then add your page selection with the [[:docs:templating:sql|page sql]]. We select the last 6 pages that have been modified. select from pages order by date_modified desc limit 6 ==== Define your fragment ==== Then define your fragment as being: * a [[:docs:lists:list|list element]] * with a [[:docs:content:link|link]] created from: * the [[:docs:page:system:path|path]] * and the [[:docs:page:title|title]] [[:docs:templating:variable|variables]] * [[$path|$title]] ==== Close your iterator component and save ==== Write the closing tag and save your page. ==== 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: [[:howto:grid_generated]]