Re: check existence of template file
| From: | Monte Ohrt | Date: | Sat, 28 Apr 2001 19:26:23 +0000 |
| Subject: | Re: check existence of template file | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-639@lists.php.net to get a copy of this message | ||
That could probably be added, although not trivial with arbitrary
template resources.
Joris Trooster wrote:
>
> Is there an easy way to check if a template file exists?
>
> Something like this:
>
> if ($template->check("templatefile.tpl")) {
> $template->display("templatefile.tpl");
> } else {
> $template->display("default.tpl");
> }
>
> Joris
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/