Re: [SMARTY] {literal}{/literal} and {ldelim}{rdelim}

From: Date: Tue, 15 Apr 2003 07:31:23 +0000
Subject: Re: [SMARTY] {literal}{/literal} and {ldelim}{rdelim}
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9265@lists.php.net to get a copy of this message
On Tue, Apr 15, 2003 at 01:27:04PM +0800, Alan Lam wrote: > Hello again Smarties, > > When I include javascript codes into my template, since javascript function blocks have a > single pair of { }, can I use {ldelim} and {rdelim} in place of literals? > Faithfully, always. yes, (of course, if i understand you right). try a template like: 1:{ldelim}...{rdelim} 2:{literal}{...}{/literal} it will give you: 1:{...} 2:{...} (note the identical braced expressions) i theory you can do: $out = str_replace(array('{','}'), array('{ldelim}','{rdelim}'), $tpl_source); and $smarty->display($out); would give you $tpl_source as output, with not a single tag executed by smarty, but passed thru literally. HTH messju > Alan Lam > alan@goodorient.com.cn > Web Developer > www.goodorient.com

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