[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-dev
Subject:    Re: [SMARTY-DEV] cycle?  is it a bug.....
From:       81.136.11.84
Date:       2005-04-30 17:57:01
Message-ID: 20050430175543.25376.qmail () lists ! php ! net
[Download RAW message or body]

Maybe that should go in the manual... Or even better the comments in the 
user manual which I'm working on as we speak ;-))))

Messju Mohr wrote:
> On Sat, Apr 30, 2005 at 06:36:44PM +0100, pete M wrote:
> 
>>COrrect .. so if the name is not there is interanlayy assign to default??
>>
>>could it not set the name to a timestamp or something (as a static var) 
>>so that the collision does not occur ??
> 
> 
> not that easy. despite of backwards compatibility issues, the cycle
> function can not tell on subsequent calls if it should create a new
> unique name or reuse one of the recent ones.
> 
> 
>>just an idea
> 
> 
> i suggest you give *every* cycle a distinct name and stick to
> that. that's the clearest and easiest way.
> 
> greetings
> messju
>  
> 
>>Pete
>>
>>Messju Mohr wrote:
>>
>>>On Sat, Apr 30, 2005 at 05:31:52PM +0100, pete M wrote:
>>>
>>>
>>>>smarty configuration has this line
>>>>
>>>>$smarty->config_overwrite = false;
>>>>
>>>>
>>>
>>>>from the config file
>>>
>>>>cols = #ffffff
>>>>cols = #ff00ff
>>>>cols = #000000
>>>>
>>>>
>>>>in the template
>>>>
>>>>{cycle values=#cols# name="foo"}
>>>>
>>>>returns
>>>>#ffffff #ff00ff #000000 #ffffff #ff00ff #000000 #ffffff #ff00ff
>>>>
>>>>
>>>>For some reason it doenst work when the name value is missing so
>>>>
>>>>{cycle values=#cols#}
>>>>
>>>>returns
>>>>#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff
>>>>
>>>>is this a bug ?
>>>
>>>
>>>works for me. omitting the name attribute is the same as setting
>>>name="default". maybe you have already another cycle without name
>>>(thus named "default") in your script and both reset each other
>>>everytime they are called.
>>>
>>>
>>>
>>>>Pete
>>>>
>>>>-- 
>>>>Smarty Development Mailing List (http://smarty.php.net/)
>>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>-- 
>>Smarty Development Mailing List (http://smarty.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic