Re: [SMARTY] Escaping the curly braces

From: Date: Fri, 09 Aug 2002 16:41:18 +0000
Subject: Re: [SMARTY] Escaping the curly braces
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5635@lists.php.net to get a copy of this message
I usually use {{ and }} for delimiters to avoid this sort of conflict. I find it easier to read anyway. Travis On Fri, 9 Aug 2002, David Pavlotzky wrote: > On Friday 09 August 2002 17:12, Mark Rogers wrote: > > All, > > > > > Use the following: > > > {literal} > > > {/literal} > > > > Out of curiosity, how easy would it be to add some other form of escaping > > for these? > > > > Eg: {{ and }}? > > I would realy like something like this. Of course I _could_ change the > delimiter like Arnoud Limbourg suggested but I like them as they are and they > wil probably cause trouble in other places. Furthermore escape sequences like > {{ or maybe \{ are common practice. > > > > > I often find I have styles being defined which need Smarty to ignore the { > > and } but which use smarty to generate the actual style code, which leads > > to a lot of {literal}s and makes code unreadable. Eg: > > BODY { > > color: {$bodycolor} > > } > > > > Similarly within JavaScript code. > > > > Mark Rogers, Quarella Ltd > > >

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