RE: [htmltmpl] Re: Patches for HTML-Template-2.5.tar.gz
Brought to you by:
samtregar
From: Cees H. <ce...@si...> - 2002-07-24 23:21:44
|
Quoting Kenny Smith <ke...@jo...>: > >> 5. add TMPL_DEF tag for defining new parameters > >> > >> <TMPL_DEF NAME="NAME" VALUE="value"> > > >I don't like this. Mixing display logic with setup of variables is a very > >dangerous thing. > > I don't even know what this is really useful for? If you are hard coding > the > definition of a variable in your template, why can't you just hard code > that > variable where you use it? You can simulate most of this functionality already with the TMPL_INCLUDE directive. Just create a new file with just the value of your template variable, and then TMPL_INCLUDE it wherever you want it. This has the added speed benefit of being done before Caching takes place. This would get messy if you have a lot of these constructs though, and they wouldn't be available for use in TMPL_IF or TMPL_LOOP statements. On that note, I would not recommend adding this feature in... Cees |