<?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: Assigning temporary variables in a template?</title>
			<link>http://www.silverstripe.org/archive/show/217539?start=0#post218000</link>
			<description>&lt;p&gt;Great, that did the trick. &quot;Current&quot; has to be in lowercase for this to work though. So:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;% control ChildrenOf(clientcases) %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;% if LinkOrCurrent = current %&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;% else %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;h2&amp;gt;$Title&amp;lt;/h2&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;% end_if %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;% end_control %&amp;gt;&lt;/p&gt;&lt;p&gt;...does exactly what I want.&lt;/p&gt;&lt;p&gt;Thanks a lot!&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Assigning temporary variables in a template? &lt;a href=&quot;http://www.silverstripe.org/archive/show/217539?start=0#post218000&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/217539?start=0#post218000&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 30 Oct 2008 23:10:36 +1300</pubDate>
			<dc:creator>superautomatic</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/217539?start=0#post218000</guid>
		</item>
		
		<item>
			<title>Re: Assigning temporary variables in a template?</title>
			<link>http://www.silverstripe.org/archive/show/217539?start=0#post217744</link>
			<description>&lt;p&gt;You can't assign vars in the template parser. But if you want to hide the current one you could just do &amp;lt;% if LinkOrCurrent = Current %&amp;gt;&amp;lt;% else %&amp;gt;// do stuff &amp;lt;% end_if %&amp;gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Assigning temporary variables in a template? &lt;a href=&quot;http://www.silverstripe.org/archive/show/217539?start=0#post217744&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/217539?start=0#post217744&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 30 Oct 2008 14:42:39 +1300</pubDate>
			<dc:creator>Willr</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/217539?start=0#post217744</guid>
		</item>
		
		<item>
			<title>Assigning temporary variables in a template?</title>
			<link>http://www.silverstripe.org/archive/show/217539#post217539</link>
			<description>&lt;p&gt;I have a folder called &quot;clientcases&quot; that includes 4 or five client cases. In the template I list the other clientcases in the sidebar (with a &amp;lt;% control ChildrenOf(clientcases) %&amp;gt; loop ). Now I want to exclude the current case from the list in the sidebar. Normally I'd just assign a temporary CurrentClientCase variable to match against the Title in the loop. But how do I assign a temporary variable like that in SS? &lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;Clientcases&lt;br /&gt; - Foo&lt;br /&gt; - Bar&lt;br /&gt; - Alice&lt;br /&gt; - Bob&lt;/p&gt;&lt;p&gt;When viewing the &quot;Foo&quot; page, only Bar, Alice and Bob should be listed in the sidebar.&lt;/p&gt;&lt;p&gt;So something like this should do it:&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;lt;% control ChildrenOf(clientcases) %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;% if Title != CurrentClientCase %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;% end_if %&amp;gt;&lt;br /&gt;&amp;lt;% end_control %&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;But how do I assign the $Title value to $CurrentClientCase (or another temp variable...)?&lt;/p&gt;&lt;p&gt;/Jens&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Assigning temporary variables in a template? &lt;a href=&quot;http://www.silverstripe.org/archive/show/217539#post217539&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/show/217539#post217539&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 30 Oct 2008 08:04:45 +1300</pubDate>
			<dc:creator>superautomatic</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/217539#post217539</guid>
		</item>
		

	</channel>
</rss>