Re: [SMARTY] extending include_php...

From: Date: Thu, 22 Jan 2004 12:44:33 +0000
Subject: Re: [SMARTY] extending include_php...
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10864@lists.php.net to get a copy of this message
On Thu, Jan 22, 2004 at 01:30:39PM +0100, Ulrik Nielsen wrote: > > Hi there, > > I would like to extend the inclide_php punction of smarty. > So that I could do file checking.. ex: > > -- smarty template ---- > {include_php file="file-xxx.php"} > ----------------------- > > -- smarty function ---- > if file exists; > include custom/file-xxx.php > else > include default/file-xxx.php > ----------------------- > > - without actualy hacking the Smarty base class.. is there a way of > achiving this ? simply set php's include_path that it looks in "custom" first and then in "default". > thanks in advance > -- > >> ulrik nielsen > excuse of the day : bit bucket overflow > from bofh : http://www.cs.wisc.edu/~ballard/bofh/

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