Re: question...
| From: | Luc Saint-Elie | Date: | Thu, 10 Jan 2002 18:34:16 +0000 |
| Subject: | Re: question... | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2512@lists.php.net to get a copy of this message | ||
At 10:58 10/01/02 -0700, 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)?$smarty->assign('myfile','/home/xxx/xxx/myfile.tpl'); {if $myfile} {include file=$myfile} {/if} I don't know if there is a shortcut Luc