Re: [SMARTY] Suggestion /Monte: Question
| From: | Monte Ohrt | Date: | Mon, 15 Apr 2002 14:22:15 +0000 |
| Subject: | Re: [SMARTY] Suggestion /Monte: Question | ||
| References: | 1 2 3 4 5 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3729@lists.php.net to get a copy of this message | ||
Norbert Röcher wrote:
"Monte Ohrt" <monte@ispi.net> schrieb im Newsbeitrag news:3CB9BF39.3050506@ispi.net...Maybe you shouldn't cache index.tpl (?) If it is mostly made up of the fetched blocks of code, it doesn't help much to cache it anyways. Montefetch('index.tpl'); If index.tpl has insert tags, they should remain dynamic. What is the problem exactly?Problem: PHP-Script: --------------------- $smarty -> caching = 1; // 2 now :-) foreach ($locations as $location){$block[$location][] = $smarty -> fetch($template".tpl"); // $template.tpl using {insert}s} $smarty -> assign ('block', $block); $smarty -> display ('index.tpl'); Template ------------- {section name=rank loop=$block.left} {$block.left[rank]} {*some html-code for block-divider*} {/section} The fetched {insert}s now get lost with caching the 'index.tpl'. {insert name=fetched block=$block.left[rank]} would not work within a section. Any suggestions? Norbert