Re: [SMARTY] advanced {include}

From: Date: Thu, 06 Feb 2003 22:36:46 +0000
Subject: Re: [SMARTY] advanced {include}
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7565@lists.php.net to get a copy of this message
On Thu, Feb 06, 2003 at 01:48:46PM -0500, Greg Beaver wrote: > 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? I don't think it is possible out of the box, but should be easy to do using smarties default_template_handler_func: http://smarty.lammfellpuschen.wg/manual/en/default.template.handler.function.php have fun messju > Thanks, > Greg

« previous php.smarty.general (#7565) next »