<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Forum posts to 'Archive'</title>
		<link>http://www.silverstripe.org/archive/rss</link>
		<atom:link href="http://www.silverstripe.org/archive/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Re: Curly braces in templates</title>
			<link>http://www.silverstripe.org/archive/show/3881?start=0#post3946</link>
			<description>&lt;p&gt;Yeah, the reg-exp parser just kind of grew out of all proportion; a better parser needs to be made ;-)&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Curly braces in templates &lt;a href=&quot;http://www.silverstripe.org/archive/show/3881?start=0#post3946&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/3881?start=0#post3946&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Tue, 14 Aug 2007 11:28:04 +1200</pubDate>
			<dc:creator>Sam</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/3881?start=0#post3946</guid>
		</item>
		
		<item>
			<title>Curly braces in templates</title>
			<link>http://www.silverstripe.org/archive/show/3881#post3881</link>
			<description>&lt;p&gt;Hi,&lt;br /&gt;i have in my template: {$Date.Format(l Y/m/d)}, and the result is: {$Monday 2007/08/13} &lt;br /&gt;I.e. the curly braces are in the output as well. I have noticed, each non-curly-braced replacement has a curly-braced replacement, except one, in SSViewer.php, so I have added this missing one:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;--- SSViewer.php.orig&amp;nbsp;&amp;nbsp;&amp;nbsp;2007-07-31 09:40:06.000000000 +1200&lt;br /&gt;+++ SSViewer.php&amp;nbsp;&amp;nbsp;&amp;nbsp;2007-08-13 13:48:43.000000000 +1200&lt;br /&gt;@@ -195,6 +195,7 @@&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'/{\\$([A-Za-z_][A-Za-z0-9_]*)\\.([A-Za-z0-9_]+)}/' =&amp;gt; '&amp;lt;?= {dlr}item-&amp;gt;obj(&quot;\\1&quot;,null,true)-&amp;gt;XML_val(&quot;\\2&quot;,null,true) ?&amp;gt;',&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'/{\\$([A-Za-z_][A-Za-z0-9_]*)}/' =&amp;gt; '&amp;lt;?= {dlr}item-&amp;gt;XML_val(&quot;\\1&quot;,null,true) ?&amp;gt;\\2',&lt;/p&gt;&lt;p&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'/{\\$([A-Za-z_][A-Za-z0-9_]*)\\.([A-Za-z0-9_]+)\\(([^),]+)\\)}/' =&amp;gt; '&amp;lt;?= {dlr}item-&amp;gt;obj(&quot;\\1&quot;)-&amp;gt;XML_val(&quot;\\2&quot;,array(&quot;\\3&quot;),true) ?&amp;gt;\\4',&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'/\\$([A-Za-z_][A-Za-z0-9_]*)\\.([A-Za-z0-9_]+)\\(([^),]+)\\)([^A-Za-z0-9]|$)/' =&amp;gt; '&amp;lt;?= {dlr}item-&amp;gt;obj(&quot;\\1&quot;)-&amp;gt;XML_val(&quot;\\2&quot;,array(&quot;\\3&quot;),true) ?&amp;gt;\\4',&lt;/p&gt;&lt;p&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'/\\$([A-Za-z_][A-Za-z0-9_]*)\\(([^),]+), *([^),]+)\\)([^A-Za-z0-9]|$)/' =&amp;gt; '&amp;lt;?= {dlr}item-&amp;gt;XML_val(&quot;\\1&quot;,array(&quot;\\2&quot;,&quot;\\3&quot;),true) ?&amp;gt;\\4',&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Btw. A comma in the argument: $Date.Format(l, Y/m/d) &lt;br /&gt;causes an error. Is there any way, how to put the comma in the argument?&lt;/p&gt;&lt;p&gt;Btw2. Isn't this regexp replacing in the SSViewer a little bit complicated? What about some simple LL/LR parser?&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Curly braces in templates &lt;a href=&quot;http://www.silverstripe.org/archive/show/3881#post3881&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/show/3881#post3881&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Mon, 13 Aug 2007 13:55:56 +1200</pubDate>
			<dc:creator>xmedeko</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/3881#post3881</guid>
		</item>
		

	</channel>
</rss>