Re: [SMARTY] How to make templates inside templates?
| From: | Valerio Santinelli | Date: | Mon, 08 Jul 2002 13:33:42 +0000 |
| Subject: | Re: [SMARTY] How to make templates inside templates? | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5225@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Martijn van Zal" <martijn@brothersinart.net>
> If you look at www.gfxartist.com you see the boxes (windows) on the right
> side of the page, those are all in the database, There is a table with
> pages, and a table with windows, and a table linking the two, with a
order.
> So I can add a window to a page in the backoffice (or database) and it
will
> show on the place selected.
>
> {foreach item=window from=$windows}
> {include file=$window.template}
> {/foreach}
>
Hmm.. I'm missing something about the way you handle your "windows".
How do you run the query on your database in order to have all the datas
needed by the windows themselves available to Smarty?
Are you checking the database to see which windows are in the current page
and then running the query to extract each window datas?
--
Valerio Santinelli
One Man Crew Gaming Community (http://www.onemancrew.org)
My Lab (http://tanis.hateseed.com)
HateSeed.com Founder (http://www.hateseed.com)
In Flames Italia Webmaster (http://www.inflames.it)