SathishKumar Subramanian
|
Friday 21 November 2003 9:53:13 pm
Hi, I can get the $i increment in the following code
{let name=lang i=1}
{section loop=10}
{set i=sum($i,1)}
{$i}
{/section} {/let} But I am not getting the $i increment in
{let name=lang i=0}
{let language_list=fetch( content, tree, hash( parent_node_id, 44,
limit, $langCount,
sort_by, array( "priority", true() ),
class_filter_type, include,
class_filter_array, array(1) ) ) }
{section loop=$language_list} {* language list *}
{set i=sum($i,1)}
{$i}
{/section}
{/let} {/let} Pls help. :( Sathizh
|
Marco Zinn
|
Tuesday 25 November 2003 7:10:48 am
You have a problem with namespaces. The "$i", that you use inside the section is not the same as you define in the first line. See http://www.ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/basics/namespaces_
and note http://www.ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/functions/section If you just want a counter for the loop, you may use "index" or "number"
Marco
http://www.hyperroad-design.com
|