Re: extending include_php...
| From: | Andre Rabold | Date: | Thu, 22 Jan 2004 12:38:15 +0000 |
| Subject: | Re: extending include_php... | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10863@lists.php.net to get a copy of this message | ||
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 -----------------------I would suggest you to use a custom resource plugin (see http://smarty.php.net/manual/en/plugins.resources.php) which checks the existance of the file.
- without actualy hacking the Smarty base class.. is there a way of achiving this ? thanks in advance