counter bug ?
| From: | Nino Katic | Date: | Sun, 27 Apr 2003 15:20:22 +0000 |
| Subject: | counter bug ? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9392@lists.php.net to get a copy of this message | ||
Hi,
I found smartys counter function working little strange. I'm using smarty
ver. 2.4.2 and this is the code inside template:
{counter name="d" start=0 print=false}
{foreach from=$page_protURL_vars item=stranica}
<a href="showtime.php?{$stranica}">{counter}</a>
{/foreach}
{counter name="a" start=0 assign="a" print=false}
{counter name="c" start=0 print=true}
{counter name="b" start=0 assign="b" print=false}
Counter named "c" will not print value 0, and if placed like so it will:
{counter name="c" start=0 print=true}
{counter name="a" start=0 assign="a" print=false}
{counter name="b" start=0 assign="b" print=false}
It will also not work if it's places last like this:
{counter name="a" start=0 assign="a" print=false}
{counter name="b" start=0 assign="b" print=false}
{counter name="c" start=0 print=true}
Why is this not working?
Nino