advanced {include}
| From: | Greg Beaver | Date: | Thu, 06 Feb 2003 18:48:46 +0000 |
| Subject: | advanced {include} | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7559@lists.php.net to get a copy of this message | ||
Hi,
For the schedule application at calendar.chiaraquartet.net, I need templates
that have userlevel-aware include. Currently, all template data is stored
ina mysql database, but I've decided to move that out to files so that I can
take advantage of Smarty's compile abilities.
I want to have {include} use a different include path for different
userlevels. By this, I mean the {include} would first search in the
userlevel include path, and if the template is not found, look in the
default directory like this:
{include file="my.tpl"}
search for include_path/userlevel/my.tpl
if not found
search for include_path/default/my.tpl
Is this already possible, or should I write my own extension for include?
Thanks,
Greg