Re: question...
| From: | Andrei Zmievski | Date: | Thu, 10 Jan 2002 18:47:20 +0000 |
| Subject: | Re: question... | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2513@lists.php.net to get a copy of this message | ||
On Thu, 10 Jan 2002, Tara Johnson wrote:
> Hi,
>
> I am wondering if there is anything in Smarty similar to isset() so that I
> can check if a value is already set or not from within a template...
>
> For example I would like to do this from directly within the template:
>
> {if isset($myFile)}
> {include file="$myFile"}
> {else}
> <b> hello world </b>
> {/if}
>
> Is there an easy way to do this (without touching the calling php file)?
Have you tried that piece of code? It should work perfectly without any
changes.
-Andrei
"I still find each day too short for all the thoughts I want to think,
all the walks I want to take, all the books I want to read, and all the
friends I want to see."
-John Burroughs