Re: [SMARTY] 2 questions

From: Date: Tue, 11 Feb 2003 12:43:07 +0000
Subject: Re: [SMARTY] 2 questions
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7637@lists.php.net to get a copy of this message
On Tue, Feb 11, 2003 at 11:59:48AM -0000, James Burrows wrote: > Hi there, > > 1) Is there any way to test if a smarty variable exists from within a > template? > > I know you can do {if $variable != ""}...{/if} but surely there's a better > way than this? {if isset($variable)} ... {/if} > 2) Is there any way to include a non-cached template within a cached > template? write an insert-function that does: ... $caching = $smarty->caching; $smarty->display($params['file']); $smarty->caching = $caching; ... and call it {insert name=... file=foo.tpl} from your cached template > Thanks for your help! > > James have fun messju

« previous php.smarty.general (#7637) next »