Difference between revisions of "Zcms:for"
From GruppoZenit
(4 intermediate revisions by one user not shown) | |||
Line 12: | Line 12: | ||
|} | |} | ||
− | Below an example on how to use the "for" tag to create | + | Below an example on how to use the "for" tag to create a <p> from 1 to 10: |
<pre style="white-space: pre-wrap; | <pre style="white-space: pre-wrap; | ||
Line 19: | Line 19: | ||
white-space: -o-pre-wrap; | white-space: -o-pre-wrap; | ||
word-wrap: break-word;"> | word-wrap: break-word;"> | ||
− | + | <zcms:for start="1" end="10" var="chk" > | |
− | + | <p><zcms:use name="chk"/></p> | |
− | + | </zcms:for> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</pre> | </pre> | ||
Line 38: | Line 29: | ||
* [[Tag library]] | * [[Tag library]] | ||
− | + | * [[Zcms:store and zcms:use#zcms:use|zcms:use]] | |
− | * [[Zcms:store and zcms:use]] | + |
Latest revision as of 18:37, 29 October 2013
zcms:for tag can iterate the contents specified in the body of the tag. Its attributes are the following:
Attribute Definition start The starting point of the loop end The ending point of the loop var The variable to which the current index is stored
Below an example on how to use the "for" tag to create a <p> from 1 to 10:
<zcms:for start="1" end="10" var="chk" > <p><zcms:use name="chk"/></p> </zcms:for>