Re: [SMARTY] 2 questions

From: Date: Wed, 12 Feb 2003 08:23:06 +0000
Subject: Re: [SMARTY] 2 questions
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7668@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; sorry! i forgot the line $smarty->caching = false; here, of course. sorry for the inconvinience. regards messju > $smarty->display($params['file']); > $smarty->caching = $caching; > ... > > and call it > > {insert name=... file=foo.tpl} from your cached template > > > Thanks for your help! > > > > James

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