RE: [SMARTY] Best practice?
| From: | Ruslan Savchyshyn | Date: | Mon, 03 Mar 2003 09:17:56 +0000 |
| Subject: | RE: [SMARTY] Best practice? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8337@lists.php.net to get a copy of this message | ||
You need only one instance of smarty for things, almost never required
need to have multiple ones.
I'm using simular approach when many(not all) things are included in one
file and it works great (fast enough).
I'm aving smarty->display - called once per page load, the varaibles are
set in php files and the templates handle what to output (like if
!empty($some_var) - output)
---------------
Ruslan Savchyshyn
http://www.MagneticOne.com/
Web development and design services
-----Original Message-----
From: Paul Coyle [mailto:paul@paulcoyle.com]
Sent: Sunday, March 02, 2003 8:46 PM
To: smarty-general@lists.php.net
Subject: [SMARTY] Best practice?
I'm just staring out with Smarty and so far I think its great. I'd just
like to know what people's thoughts were on how I have been approaching
using Smarty with the fusebox-like style of app building that I use. A
short example: I have index.php require the Smarty class file and then
create an instance of the smarty object. Each subsequent file I include
from index.php (like header.php, footer.php or whatever the in-betweens
are) simply does some work then assigns some variables and then displays
a template. Performance-wise, is this a good way to go about this sort
of thing? Should I maybe be instantiating a new object for each
.php/.tpl combination?
Thanks very much,
Paul
(Hope this didn't get posted a bunch of times)
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php