Re: [SMARTY-DEV] Problem with counter and print="false"

From: Date: Wed, 21 Jan 2004 11:42:02 +0000
Subject: Re: [SMARTY-DEV] Problem with counter and print="false"
References: 1 2 3 4 5 6 7  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2053@lists.php.net to get a copy of this message
On Wed, Jan 21, 2004 at 12:16:48PM +0100, Katana wrote: > >can you post (or send me) an example loop, that works for you in 2.5.0 > >but not in 2.6.0? > See attachment. Both counter output an integer. > > >as a test you can also copy function.counter.php from the 2.5.0 > >distribution in your 2.6.0-plugins-dir. i guess you counters would > >work then. > Already did that, and indeed it works :) hmm. the difference is: in 2.5.0 the assign attribute overrides the print attribute. (if assign is provided the output is never printed) in 2.6.0 the print attribute overrides the assign attribute. (if assign is provided the default for print is false but can be overridden with the print-attribute) > Katana > > {section name=images loop=$IMAGES} > > {counter name="onrow" assign="onrow" print="false"} > > {* D?but de ligne, on initialise le compteur et on ouvre la ligne *} > {if $onrow == 1} > <!-- BO Ligne de galerie --> > {counter name="nbr_row" assign="nbr_row" print="false"} > <tr> > {/if}

« previous php.smarty.dev (#2053) next »