Re: [SMARTY] Caching newbie questions
| From: | Jacques Jocelyn | Date: | Fri, 04 Apr 2003 14:30:40 +0000 |
| Subject: | Re: [SMARTY] Caching newbie questions | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9089@lists.php.net to get a copy of this message | ||
Hello pt2002,
p> Do I need to create a Smarty object for each template and se cache = false
p> for left_nav_bar.tpl ? Something like this ?
p> $header = new Smarty(); // cache = true
p> $left_nav_bar = new Smarty(); // cache = false
p> $index = new Smarty(); // cache = true
p> $footer = new Smarty(); // cache = true
p> assign code here
p> $header->display("header.tpl");
p> $left_nav_bar->display("left_nav_bar.tpl");
p> $index->display("index.tpl");
p> $footer->display("footer.tpl")
I had a similar issue, here is how I proceeded
$smarty= new Smarty;
$smarty->display("header.tpl");
$smarty->caching = false;
$smarty->display("left_nav_bar.tpl");
$smarty->caching = true;
$smarty->display("index.tpl");
$smarty->display("footer.tpl")
As a result, the template between false/true caching value will not be
cached.
I hope that helps.
Best regards,
Jacques