Re: [SMARTY] Escaping { in assign statement (not using {literal})
| From: | Monte Ohrt | Date: | Wed, 10 Aug 2005 16:53:11 +0000 |
| Subject: | Re: [SMARTY] Escaping { in assign statement (not using {literal}) | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12942@lists.php.net to get a copy of this message | ||
Or:
{capture assign="somevar"}this: {ldelim}{rdelim} is a tag{/capture}
Or:
$smarty->assign('somevar','this: {} is a tag');
Or:
my.conf:
tagtext = this: {} is a tag
{config_load file="my.conf"}
{$smarty.config.tagtext}
boots wrote:
That's tricky because you can not embed '{' and '}' (specifically '}') anywhere in a smarty tag so you can't use {ldelim} or {rdelim}... but you can use $smarty.ldelim and $smarty.rdelim. {assign var="somevar" value="this:$smarty.ldelim$smarty.rdelimis a tag"} HTH --- Ivo Jansch <ivo@ibuildings.nl> wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, how can I make this work: {assign var="somevar" value="this: {} is a tag"} I need to escape the {} somehow, so it doesn't break the assign tag. Greetings, Ivo - -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC+hHY95NUnGFZm9cRAsdUAJ91VIOWOIgcu7pF++SUD7BQSerxbQCfYdlz iyhYbgIpA9id2vWzQl5sU7Q= =0+dH -----END PGP SIGNATURE-----__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com