Re: [SMARTY] includes
| From: | Zoran Knezevic | Date: | Thu, 02 Sep 2004 15:29:12 +0000 |
| Subject: | Re: [SMARTY] includes | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11755@lists.php.net to get a copy of this message | ||
You can do it in php with switch and assign $reports variable to the smarty... the only thing is
then programmer decides what should be done on the template.
{include file=$reports}
pete M <pmorgan@ukds.net>:
> is there a more elegant way to code below..The variable companed is also
> tpart of the file name
>
> {if $report_type == 'general'}
> {include file="reports.general.inc.html"}
>
> {elseif $report_type == 'ppm'}
> {include file="reports.ppm.inc.html"}
>
> {elseif $report_type == 'finance'}
> {include file="reports.finance.inc.html"}
>
> {elseif $report_type == 'testing'}
> {include file="reports.testing.inc.html"}
> {/if}
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>