Table of Contents

About

iterator permits to loop over a content fragment in order to create a list of pages.

You may use it to generate any layout.

In particular, you may use it to generate the following layouts:

Layout Description
grid a grid of cells that adapt to the screen size
carrousel horizontal list navigation with control
simple list a vertical list with bullet points
table a table
masonry bricks that fill the wall

Example

Masonry

The below iterator example:

  • will generate the last 4 modified pages (defined by the page sql in the data node)
select order by date_modified desc limit 4

The iterator markup:

<iterator>
    <data>select where is_low_quality = 0 order by date_modified desc limit 6</data>

    <heading d3 align="center"> The last 6 Changes </heading>
    <masonry>
        <fragment>
            <card clickable>
            <page-image ratio="16:9"/>
            === $title ===
            <itext color="muted">${date_modified | format('MMM dd HH:mm')}</itext>
            
            ${description | head(100,'...')} [[$path| ]]
            </card>
        </fragment>
    </masonry>
</iterator>

The Result:

The last 6 Changes
Undraw Stepping Up
How to create a top menu bar?

Apr 15 08:36

The theme system supports the creation of a slot page called header slot in order to create a menu bar...

Material Design Choose Icon
How to configure the Favicons

Apr 15 08:35

This page is an HowTo that shows you how to choose and install a favicon and your logo image with ComboStrap. You...

Move Plugin Rename
Third Plugins - ComboStrap Getting Started

Apr 15 08:35

This page is an optional and informative step that highlights important information that you should now...

Dokuwiki Admin Window Default Template
How to install Combo ?

Apr 15 08:34

Combo is the bundle of components that complements the strap template. This step shows you how to install...

Undraw Stepping Up
How to install Dokuwiki ?

Apr 15 08:34

Because ComboStrap is built on top of the Dokuwiki Engine, the first step is to install it. This page...

Undraw Building Websites I78t
How to define your data set with Sql

Apr 15 08:28

This page defines the sql that can be used to retrieve data from pages

Syntax

<iterator>
   <data>select where variable = 'xxx'</data>
   ... header  markup...
   <fragment>Fragment markup with $variable1 ... $variable2</fragment>
   ... footer  markup...
</iterator>

where:

  • data contains a page sql
  • fragment is a content fragment that will be repeated for each data row.
  • If your iteration is time-based, you may need to set a page cache expiration frequency.
  • If the data does not return any rows, the iterator content is not printed (ie header and footer included)