Re: Hack to print defines
| From: | Anders Janson | Date: | Fri, 21 Sep 2001 21:59:00 +0000 |
| Subject: | Re: Hack to print defines | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1515@lists.php.net to get a copy of this message | ||
>>This doesn't seem like a good idea to me -- you are basically violating
the separation of data/logic/presentation.
The data/logic is still somewhere in my app - do the define. Presentation
is in the template - print the defined stuff. The only logic I put
in the presentation is to avoid printing an undefined constant's
name as plain text.
>> It's not that tough to assign constants to Smarty by using get_defined_constants(),
that is, if you _really_ need to do it.
Believe me, I would have used it, but for most people out there that
function does not exist. Not yet. Many hosts are not even having
PHP4.0.6 yet. When 4.0.7 is released AND in use by a majority of
hosts - perhaps...
/Anders