Re: [SMARTY-DEV] function.html_options.php

From: Date: Thu, 04 Apr 2002 16:40:40 +0000
Subject: Re: [SMARTY-DEV] function.html_options.php
References: 1 2 3  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-21@lists.php.net to get a copy of this message
Roberto Berto wrote:
Monte, Should html_select_date be a function of the template engine?
Yes, it doesn't restructure content coming from the application.
Should popup?
It works good as a custom function... although I'm considering taking this out of the distribution and let people get overlib from the overlib site... but that is a different matter.
Even html_select_time?
Yes, it doesn't restructure content coming from the application.
Or html_select_date should have the reverse_years attribute?
You don't pass the years as an array from the application do you?
Tell-me, whaths the "why" of Custom Functions? Isn't give to Designers an option to Customize what the Programmers set?
I don't see the argument here. I'm talking about changing the _structure_ of the content assigned from the application.
Why Smarty have IF/ELSE, or the Assign?
These help control the display of the content. Assign is even iffy, but still you are not restructuring content.
I dont undestand why you are asking for thoughts about a Smarty feature.
I just want a consensus. I'm not trying to say that your particular feature isn't good, I'm just wondering in general, if the template engine should be changing content structure, or is that a function of the application. I'm sure there could be situations where giving this power to the template engine could cause problems.
Sort the array is something usefull to Display the content!
True, this can be handy in certain situations. I'm just thinking of things from another perspective. Let's say the array of data comes from a database. All of a sudden my "order by" clause has no control over what order things are being displayed, this control has just been handed over to the template engine. Is that permissable, or should the application be handling these semantics? Maybe there is no problem at all, and reordering assigned arrays in the template engine is quite alright. I'm just looking for some more thoughts on it. To go to the extreme, why not make every function of PHP a custom function in the template engine? {array_sort array=$foo} Monte

« previous php.smarty.dev (#21) next »