Re: New looping method proposal

From: Date: Mon, 19 Nov 2001 11:04:01 +0000
Subject: Re: New looping method proposal
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1948@lists.php.net to get a copy of this message
Ivo Jansch wrote: > Hello Monte, > > Monte Ohrt wrote: > > > This is only good for looping through one variable. More times than > > not, there are several variables you want to access from within the > > loop. > > I don't know about this 'more times than not'. If you have your data > structured correctly, then most of the time you use associative arrays. > So you loop 1 array, and have access to all data in that array. > > But this is a personal thing. How do the other template editors on this > list think about this? If there's more than just me, I can have a look > at implementing it. > Facts: The functionality is already there. Template designers do have to learn *some* syntax. Personal opinions: Adding more code to Smarty just because the original syntax doesn't look/feel OK sounds like a bad idea. This will be code that does things that Smarty already can do. And template designers will have to learn yet another syntax. A bit easier for those who know PHP, but a designer who doesn't could just as well learn the original syntax, which is far more powerful once you know it. However, if this new code could be kept to a minimum, and only provide a new interface to the existing "{section}" code, maybe it's worth a try. But I reserve the right to be a bit sceptical about the needs for all this :) /Anders

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