From 6ceb0ff0be59745584e459a9771fc1c16a0e37d7 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 5 Sep 2006 21:36:19 +0000 Subject: [PATCH] document the built-in loop counter variable --- lib/WebGUI/i18n/English/Asset_Template.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/i18n/English/Asset_Template.pm b/lib/WebGUI/i18n/English/Asset_Template.pm index ecd37445b..415a39632 100644 --- a/lib/WebGUI/i18n/English/Asset_Template.pm +++ b/lib/WebGUI/i18n/English/Asset_Template.pm @@ -186,6 +186,8 @@ Loops iterate over a list of data output for each pass in the loop. Loops are sl

Loop Conditions
Loops come with special condition variables of their own. They are __FIRST__, __ODD__, __INNER__, and __LAST__. +There is also a loop counter variable, __COUNTER__, which keeps track of how many times the +loop has been executed.

Examples:

@@ -211,13 +213,18 @@ Loops come with special condition variables of their own. They are __FIRST__, __ <TMPL_IF __LAST__> This only outputs on the last pass. <TMPL_IF> + + Loop number: <TMPL_VAR __COUNTER__> + This keeps track of how many times you have gone through the loop. + <TMPL_IF> </TMPL_LOOP>

NOTE: This only documents WebGUI's default template language, HTML::Template. If the Template Type has been set to some other language you will need to consult the documentation for it.

. +

Some examples have been borrowed from the HTML::Template documentation.

. |, - lastUpdated =>1146243644, + lastUpdated =>1157490959, }, 'template variable title' => {