Question about smarty, and if it can replace PHPLIB
| From: | Tom Sommer | Date: | Wed, 19 Feb 2003 13:54:54 +0000 |
| Subject: | Question about smarty, and if it can replace PHPLIB | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7865@lists.php.net to get a copy of this message | ||
Currently I am building a website of PHPLIB templates, however I have seen
benchmarks where smarty is much faster and PHPLIB is starting to bug me with
blocks etc., so I am thinking of making a fast change to smarty... however,
I have come to find the very good way of creating templates, her is how I've
built them
<html>
<title>{TITLE}</title>
<body
{CONTENT}
</body>
</html>
Now, I have this in a main file called index.tpl, and on news.php I load
another tpl along with index.tpl (lets call it news.tpl) file, add variables
to it and then redirect the final parsing of news.tpl to the variable
CONTENT (I also set the TITLE var in news.php) in index.tpl... and finally
displaying index.tpl on news.php (with news.tpl as CONTENT)
....... can smarty do this?
Hope you understand my little config here :)
I don't want to hear about including top and bottom headers, since I've
worked that way for a long time and have come to love my new way of working
with templates :)
Thanks for any help :)
--
Tom Sommer
www.tsn.dk - www.dreamcoder.dk