Re: New looping method proposal
| From: | Anders Janson | Date: | Mon, 19 Nov 2001 15:13:39 +0000 |
| Subject: | Re: New looping method proposal | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1959@lists.php.net to get a copy of this message | ||
Luc Saint-Elie wrote:
>
>
> I'm not competent to judge if foreach is better or not that section.
Neither am I, but I can't keep my mouth shut, and feel I must force my opinions on
all of you ;-)
> [snip]
> So as long as all this doesn't add complexity or overhead to Smarty.. this is
> simply fine.
>
> Section are great, perhaps in some light circumstances, a foreach would be even
> more cool.. fine?
I have not tested the HTML_table thingy, but it looks great. But that is an
add-on.
I don't want it built into Smarty. Remember that Smarty can do more than generate
HTML.
If the {foreach} could be hacked as a plugin or custom function, I'd say "Yes!! Go
for it!!". Unfortunately, the Smarty architecture does not allow this (yet!).
Which means the only way is to hack the Smarty core, and I really don't like the
thought.
Hmm, I could summarize my opinions:
- If it works, don't fix it.
- If it is too specialized: don't add it.
- If it is optional - Sure, why not!?
/Anders