|
| In fact that there is no else, maybe you don't need to handle
that because of there can't be anything else as value for
$report_type, why don't you just try sth. like
{include file=3D"reports.".$report_type.".inc.html"}
or
{include file=3D"reports.$report_type.inc.html"}
But i didn't try it and i don't know if smarty can
parse vars that way...
-----Urspr=FCngliche Nachricht-----
Von: pete M [mailto:pmorgan@ukds.net]=20
Gesendet: Donnerstag, 2. September 2004 16:17
An: smarty-general@lists.php.net
Betreff: [SMARTY] includes
is there a more elegant way to code below..The variable companed is also
tpart of the file name
{if $report_type =3D=3D 'general'}
{include file=3D"reports.general.inc.html"}
=09
{elseif $report_type =3D=3D 'ppm'}
{include file=3D"reports.ppm.inc.html"}
=09
{elseif $report_type =3D=3D 'finance'}
{include file=3D"reports.finance.inc.html"}
=09
{elseif $report_type =3D=3D 'testing'}
{include file=3D"reports.testing.inc.html"}
{/if}
--=20
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
________________________________________
__________________
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 27.08.2004
=20
---
________________________________________
__________________
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 27.08.2004
=20
|
|