Re: [SMARTY] counter bug ?

From: Date: Mon, 28 Apr 2003 11:58:14 +0000
Subject: Re: [SMARTY] counter bug ?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9402@lists.php.net to get a copy of this message
On Sun, 27 Apr 2003, messju mohr wrote: > now i have a question (the documentation is unclear here): > > when i do > > {counter name="a" assign="a"} ({$a} is 1 now) > ... > {counter name="a"} > > should $a become 1 or 2? > > what i mean: should counter "remember" the assign attribute of the > first call to counter, and assign the value to $a at the second call, > even, when the assign is not given there? I'd like it to write "assign" only the first time you use counter. After that one can write: {counter name="a"} and it will automaticlly change $a in a $a++ way. In documentation counter is displayed as {counter} what is not very usefull when u have more counters in the same template, so {counter name="something"} should be used to increse and display correct counter. I'm not sure if this also works correctly? Nino

« previous php.smarty.general (#9402) next »