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 My Documents
ComboStrap WebSite

Nov 28 16:36

A Combostrap WebSite is a collection of files (pages, images, ...) that can run everywhere thanks...

Undraw Design Objectives Re 94pd
How to add an Ad with the Ad Tag ?

Nov 28 16:36

The ad tag is a syntax component of the ads module that will insert a ad (ie ad page). For instance,...

Undraw Design Objectives Re 94pd
ComboStrap - Ads

Nov 28 16:36

Ads is a module that permits to add Ads snippet (known as Ad Unit) in your website. Ad Unit the location...

Hidepages Extrabar Configuration
ComboStrap Ads - Global Configuration

Nov 28 16:36

For all ads module, the ads are located in the namespace (directory) called combostrap Ads page have...

Undraw Design Objectives Re 94pd
ComboStrap Ads - Automatic In-Article Ads

Nov 28 16:36

In-article Ads are ads that will show up in the page content. spread the ads roughly to have one...

Ad Sense Snippet
What is an ad Page?

Nov 28 16:36

An ad page is a page that contains the ad snippet (ie a bit of code that defines the content of the ad)....

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)