ComboStrap - Template Iterator

About

iterator permits to loop and applies a template in order to create a list of pages.

You may apply the following layout:

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 4</data>

    <heading d3 text-align="center" spacing="mb-3"> The last 4 Changes </heading>
    <masonry>
        <template>
            <card clickable>
            <page-image path="$path" ratio="16:9"/>
            === $title ===
            <itext color="muted"><date format="%h %d - %H:%M">$date_modified</date></itext>
            
            $description [[$path| ]]
            </card>
        </template>
    </masonry>
</iterator>

The Result:

The last 4 Changes

ComboStrap - Create your web footprint that last ForEver

Jan 16 - 23:41

Advertise yourself, your documentation or your company with a product that makes a qualitive website design, creation and management, unique, easy and fun

Fatal Error - Class 'SimpleXMLElement' not found

Jan 16 - 23:37

Until 1.12, Combostrap mades use of the <https://www.php.net/manual/en/simplexml.installation.php> library to manipulate SVG and HTML code This library is installed by default and is therefore part of most of the installation. If you don't have it, you may got the following error and this article is a step by step on how to resolve it.

How to get help with ComboStrap

Jan 16 - 23:37

We are here to help, don't hesitate to mail us. This page shows you also all other support channel on how to build a great website.

The plugin supported and/or tested against combostrap

Jan 16 - 23:37

The plugins supported and tested to work with ComboStrap

Syntax

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

where:

  • data contains a page sql
  • template is a template 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)
Powered by ComboStrap