ComboStrap - Iterator

About

iterator permits to loop and applies a template repeatably 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 URL Management - Pages Rules

Oct 16 - 13:07

ComboStrap URL Management - Pages Rules URL About page rules are rules that permits to apply a ComboStrap URL Management - Redirection for a page or a group of page. Example Redirect all pages from the namespace database to db databasedb With the below rule: * Pattern: database:*

ComboStrap URL Management - Redirection

Oct 16 - 12:59

ComboStrap URL Management - Redirection URL About ComboStrap performs two kind of redirection: * an ComboStrap URL Management - ID Redirect * an HTTP Redirect Processing If a page does not exist * if the page has a ComboStrap Page Metadata - Canonical URL, rewrite the Pagename to the ComboStrap Page Metadata - Canonical URL one * if the page has a ComboStrap URL Management - Pages Rules, redirect with a permanent redirection (301)

_

Color - How to specify a Color Value on ComboStrap Component

Oct 08 - 19:49

Color management in ComboStrap

Dynamic Page Quality Monitoring Feature - Improve your page quality while writing

Oct 07 - 11:40

Dynamic Page Quality Monitoring is a ComboStrap feature that encourages the writer to improve the quality score of the page. A message is shown that indicates the quality rules that can be improved and how.

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 cache expiration on your page with the cache component
  • If the data does not return any rows, the iterator content is not printed (ie header and footer included)
Powered by ComboStrap