Share » Forums » Developer » is this a bug or i'm doing something...

is this a bug or i'm doing something bad?

is this a bug or i'm doing something bad?

Tuesday 08 August 2006 8:19:16 am - 1 reply

Author Message

Claudia Kosny

Saturday 12 August 2006 6:04:49 pm

Hi Luis,

it works fine for me (Ez 3.7.5 and 3.8.1).
If you want to go to the root of it I would try some of the following:
Make sure that $counter is defined all the times. Maybe you undef it after including the first template with this code so that during the second call of this loop there is no counter to set and thus the while condition never evaluates to true.

If this is not the problem, try to see what values the counter has in each iteration. To do that print the counter in each iteration and add a conditional {break} within the loop, something like this:

{if is_set($counter)|not}
 {def $counter=0}
{/if}
{set $counter=0}
{do}
 {set $counter=inc( $counter )}
 counter is set to {$counter} <br />
 {if $counter|gt(20)}
   breaking {$counter}
   {break}
 {/if}
{/do while ne( $counter, 10)}

Claudia

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu