Re: [SMARTY] Template inside template
| From: | HarryG | Date: | Sat, 08 Jan 2005 23:10:38 +0000 |
| Subject: | Re: [SMARTY] Template inside template | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12123@lists.php.net to get a copy of this message | ||
But will this also call the menu.php. Because there will be queries that
need to be run before the menu.tpl can be displayed.
So do I have to in index.php do something like this and in index.tpl
-index.php-
switch($_GET['manage'])
{
case "pages": $mypage->assign('IncludeFile', "pages.tpl");
break;
case "users": print "hohoho"; include 'users.php'; break;
-index.tpl-
{if $IncludeFile!=""}
{include file="$IncludeFile"}
{/if}
"Rainer Müller" <mueller_rainer@gmx.de> wrote in message
news:crpe4o$tnb$1@sea.gmane.org...
> HarryG wrote:
> > Hi
> >
> > I want to have an index.php which is contructed by four templates
> >
> > index.tpl
> > menu.tpl
> > content.tpl
> > footer.tpl
>
> Use $smarty->display('index.tpl'); and in index.tpl you can specify more
> includes for other templates {include file="menu.tpl"}.
> All assigned variables are also available in the included templates.
>
> Rainer