Re: challenging Smarty - componentized template
Marcus Bointon <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <BC565782.29876%[email protected]> |
on 14/2/04 22:23, Muhammed Mamedov at [email protected] wrote: > But still having some questions with the general Smarty work principle, like > for example "Is there a performance difference using {include file='dddd.tpl'} > and {include_php file=''somephp.file}?" I am currently trying `smartize` my > 100% ready and running PHP site and wonder if I have to transform my .php > includes into .tpl files where possible, or including php directly in > templates is also ok.. I don't know what the performance difference might be, because you probably shouldn't be doing it anyway. Most of the point of Smarty is to keep code out of your templates, or at least keep it to handling presentation logic (which is what Smarty's logic is for), so you should not really ever need to include a PHP file in your template. Including template components is an excellent way to work, I use it for headers and footers etc. If you're regularly wanting to include PHP in your templates, either you've got your logic mixed up, or you should perhaps look at writing a Smarty extension... Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [email protected] | http://www.synchromedia.co.uk -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php