To who's right is right??
| From: | Gerard Samuel | Date: | Mon, 17 Jun 2002 06:24:19 +0000 |
| Subject: | To who's right is right?? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-4886@lists.php.net to get a copy of this message | ||
Well I finally got my hands dirty with smarty (and using templates at that) this weekend.
Its was way easier that what I originally thought.
At first, I was using logic within the templates to determine what to display.
Then I thought to myself, why am I determining what to present in 2 places (php code & smarty).
Ex 1 Determining what to display when a user is a registered user.
Ex 2 Run a database loop to fill and array and then do another loop to display it in smarty.
So I went back and redid how things were done and have php decide what to display, while
Smarty piece the chunks of template code together to form the document.
For example, database loops, as soon as I get the info from the database, I assign and display it, instead of
going through 2 loops to display content.
The bottom line, is there a right way or a wrong way to use smarty?
Would I be penalised for not using smarty's logic routines?
As this was my first time ever using a template engine, I didn't want to get too deep into it,
and find out that Im doing things the wrong way.
Thanks for any input you may provide.
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/