| Robert Amos 2004-09-02, 4:01 pm |
| how about : $smarty->display('reports.'.$report_type.'.inc.html'); ? I
find far too many people rely on great big include trees for layout..
otherwise you can try {include file="reports.`$report_type`.inc.html"}
See: http://smarty.php.net/manual/en/lan...ntax.quotes.php
-bok
On Thu, 02 Sep 2004 15:17:00 +0100, pete M <pmorgan@ukds.net> wrote:
> 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
>
>
|