Re: Question about Smarty

From: Date: Mon, 18 Jun 2001 09:42:26 +0000
Subject: Re: Question about Smarty
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-893@lists.php.net to get a copy of this message
Hello, Sounds cool, could you elaborate ? In this case I'd have used : <tr> <!-- this is dependent on a 'page' param, so you could for example call your site like this: index.php?page=help --> <td>{if $page eq "help" } {include file= "stuff.tpl"} {/if} </td> </tr> En réponse à Ivo Jansch <ivo@ibuildings.nl>: > Hi, > > > Can this be done and if so has anyone tried it using > > Smarty? Basically I want one default.tpl page to > > structure the rest of the sites php output. > > You can do it like this: > > index.tpl: > > <table> > <tr> > <!-- always the same file throughout the site --> > > <td>{include file="top.tpl"}</td> > </tr> > <tr> > <!-- this is dependent on a 'page' param, > so you could for example call your site > like this: index.php?page=help --> > > <td>{include file=$page}</td> > </tr> > <tr> > <!-- always the same file throughout the site --> > > <td>{include file="bottom.tpl"}</td> > </tr> > </table> > > Greetings, > Ivo

« previous php.smarty.general (#893) next »