diff --git a/docs/designers.sgml b/docs/designers.sgml index ba2e714c..30f8f530 100644 --- a/docs/designers.sgml +++ b/docs/designers.sgml @@ -1908,6 +1908,64 @@ phone: 555-4444<br> fax: 555-3333<br> cell: 760-1234<br> + + + Foreach-loops also have their own variables that handle foreach properties. + These are indicated like so: {$smarty.foreach.foreachname.varname} with + foreachname being the name specified as the name + attribute of foreach + + + + + iteration + + iteration is used to display the current loop iteration. + + + Iteration always starts with 1 and is incremented by one + one each iteration. + + + + + first + + first is set to true if the current foreach iteration is the first + one. + + + + + last + + last is set to true if the current foreach iteration is the last + one. + + + + + show + + show is used as a parameter to foreach. + show is a boolean value, true or false. If + false, the foreach will not be displayed. If there is a foreachelse + present, that will be alternately displayed. + + + + + total + + total is used to display the number of iterations that this foreach + will loop. This can be used inside or after the foreach. + + + + + + + include