sub-template problem with cache
| From: | k | Date: | Wed, 08 May 2002 23:16:55 +0000 |
| Subject: | sub-template problem with cache | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-4104@lists.php.net to get a copy of this message | ||
I have made a page with 3 parts:
head.tpl
body.tpl
foot.tpl
/The header has 1 {insert}, the body has several others, the footer is static./
In the php file i have:
$Smarty->display(body.tpl,$QUERY_STRING),
an so the body.tpl looks like this:
{include file="head.tpl"}
blablabla
...
{include file="foot.tpl}
If cache is ON, than the three parts are displayed in wrong order:
body
head
foot
(So, it looks a bit funny...;)
If cache is off, than the page is ok.
So what could be the problem? What kind of effect cache has on the order of displaying the template
parts, file includes?
/I have several {insert}s in the body.tpl, where I allways use "if is_cached", if that
matters/
BTW, I have the same (bad) result, if I do it like this:
$SM->display('head.tpl',$QUERY_STRING);
$SM->display('body.tpl',$QUERY_STRING);
$SM->display('foot.tpl',$QUERY_STRING);
I use the latest Smarty release.
TIA,
k
--
k <szkaroly-BLABLA-@freemail.hu>
Suse 7.3 - 2.4.16-4GB - KDE 3