Re: [SMARTY] Caching newbie questions
| From: | Alex | Date: | Fri, 04 Apr 2003 14:32:19 +0000 |
| Subject: | Re: [SMARTY] Caching newbie questions | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9090@lists.php.net to get a copy of this message | ||
why not just use the insert function and cache ids. besides, compiling 3 templates is time consuming
Jacques Jocelyn wrote:
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 ?-- .::....::.:...::...:..:.:::..:..:..::.:..:..:::..:::...::..:.. :: PUBLIC VOICE Lab :: Alexey Kulikov :: :: The International Media Coop :: alex@pvl.at :: :: www.pvl.at :: phone: +43 699 1 9228792 ::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 = truep> assign code herep> $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