Re: include_else?????
| From: | Andr� Rabold | Date: | Thu, 14 Nov 2002 07:43:56 +0000 |
| Subject: | Re: include_else????? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6428@lists.php.net to get a copy of this message | ||
try to check if the file exists before including it
{if file_exists("path/to/my/template.tpl")}
{include file="path/to/my/template.tpl"}
{else}
Template not found
{/if}
"Alexander Pervak" <shura@ukrsat.com> schrieb im Newsbeitrag
news:11627704356.20021113183127@ukrsat.com...
> Hi all!
>
> Is there some Smarty function like foreachelse which prevents errors
> on including non-existing templates. It might be called includeelse
> or something like that.
> It's really useful function! I suprized with it absence.
>
> --
> Best regards,
> Alexander mailto:shura@ukrsat.com
>