Re: [SMARTY] Curly braces inside a function argument
| From: | Owen Cole | Date: | Tue, 21 Aug 2007 18:57:02 +0000 |
| Subject: | Re: [SMARTY] Curly braces inside a function argument | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13748@lists.php.net to get a copy of this message | ||
How about using the html entities:
}
{
Or URL encoding:
%7B
%7D
Then simply decode in your function.
This is not a bug.. if you *really* had to you could change your smarty template delimiters and the problem would go away.
Josh Trutwin wrote:
On Tue, 21 Aug 2007 12:58:31 -0500 "Ben Davis" <bendavis78@gmail.com> wrote:-- Looking for a Creative Support Team? We Can Help... Web, Design and Hosting. Owen Cole Director of Information Technology Blue Spider Inc. PO Box 2219 Warminster, PA 18974 www.bluespiderinc.com Phone : 215-957-1186 Fax : 215-957-5226How can put curly braces inside of a function argument? Is it not possible? everything I've tried doesn't seem to work: {myfunc test="foo {bar}"} {myfunc test='foo {bar}'} {myfunc test="foo {ldelim}bar{rdelim}"} No matter what, smarty always percieves the first closing brace as the closing brace for the function itself. Should this be considered a bug?Not sure if it's the "best" way but did you try: {myfunc test="foo {ldelim}bar{rdelim}"} http://smarty.php.net/manual/en/language.function.ldelim.php Josh