<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Define your own &#8220;for_layout&#8221; variables</title>
	<atom:link href="http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 16 Mar 2010 17:17:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-129807</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 05 Jun 2009 15:16:08 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-129807</guid>
		<description>@Eppo: Hm, I just tested it here with the latest CakePHP version, and it works as described in the article. Can you post the relevant code somewhere, for example on &lt;a href=&quot;http://bin.cakephp.org&quot; rel=&quot;nofollow&quot;&gt;http://bin.cakephp.org&lt;/a&gt;?</description>
		<content:encoded><![CDATA[<p>@Eppo: Hm, I just tested it here with the latest CakePHP version, and it works as described in the article. Can you post the relevant code somewhere, for example on <a href="http://bin.cakephp.org" rel="nofollow">http://bin.cakephp.org</a>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eppo</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-129800</link>
		<dc:creator>Eppo</dc:creator>
		<pubDate>Fri, 05 Jun 2009 13:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-129800</guid>
		<description>well i tried this, but nothing was showed in the $var_for_layout

When i do a pr($this-&gt;value) in afterRender.. its just empty..

When i do a pr($this-&gt;value) in valueSet($value) I get the value thats set in the view..

How to do this?</description>
		<content:encoded><![CDATA[<p>well i tried this, but nothing was showed in the $var_for_layout</p>
<p>When i do a pr($this-&gt;value) in afterRender.. its just empty..</p>
<p>When i do a pr($this-&gt;value) in valueSet($value) I get the value thats set in the view..</p>
<p>How to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-54820</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 08 Jan 2008 17:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-54820</guid>
		<description>@Webspin: Your model shouldn&#039;t know anything about a view resp. a layout. That means your controller has to get the data from the model and pass those data to the layout.</description>
		<content:encoded><![CDATA[<p>@Webspin: Your model shouldn&#8217;t know anything about a view resp. a layout. That means your controller has to get the data from the model and pass those data to the layout.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Webspin</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-53616</link>
		<dc:creator>Webspin</dc:creator>
		<pubDate>Sun, 06 Jan 2008 14:37:45 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-53616</guid>
		<description>Is there a way to set a custom layout variable from within the model directly?  Or do you have to pass values from the model to the controller, and then have the controller set them to the layout?</description>
		<content:encoded><![CDATA[<p>Is there a way to set a custom layout variable from within the model directly?  Or do you have to pass values from the model to the controller, and then have the controller set them to the layout?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-6419</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 03 May 2007 17:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-6419</guid>
		<description>@moeffju: No, it is a fine solution for certain scenarios, see also the other comments.</description>
		<content:encoded><![CDATA[<p>@moeffju: No, it is a fine solution for certain scenarios, see also the other comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moeffju</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-6418</link>
		<dc:creator>moeffju</dc:creator>
		<pubDate>Thu, 03 May 2007 13:28:17 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-6418</guid>
		<description>I would just set the generic for_layout var in the AppController&#039;s beforeFilter (to &#039;&#039;), and overwrite them in the specific controllers. Is there any reason that would be a bad idea?</description>
		<content:encoded><![CDATA[<p>I would just set the generic for_layout var in the AppController&#8217;s beforeFilter (to &#8221;), and overwrite them in the specific controllers. Is there any reason that would be a bad idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: othman ouahbi</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-6378</link>
		<dc:creator>othman ouahbi</dc:creator>
		<pubDate>Tue, 01 May 2007 09:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-6378</guid>
		<description>By using @ you&#039;re only supressing the notice on  the variable you&#039;re *expecting* so it&#039;s ok.</description>
		<content:encoded><![CDATA[<p>By using @ you&#8217;re only supressing the notice on  the variable you&#8217;re *expecting* so it&#8217;s ok.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-6372</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Mon, 30 Apr 2007 15:29:24 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-6372</guid>
		<description>@Dieter: Yes, I am calling $demo-&gt;setValue(&#039;value&#039;); from my view.

@Felix: Yes, that works. But personally I think it is a bad idea to suppress error messages for errors you can simply avoid.</description>
		<content:encoded><![CDATA[<p>@Dieter: Yes, I am calling $demo->setValue(&#8216;value&#8217;); from my view.</p>
<p>@Felix: Yes, that works. But personally I think it is a bad idea to suppress error messages for errors you can simply avoid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Stein</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-6370</link>
		<dc:creator>Joel Stein</dc:creator>
		<pubDate>Sun, 29 Apr 2007 18:45:21 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-6370</guid>
		<description>@felix: thanks for the tip.

In case anyone else was like me and didn&#039;t know what Felix is talking about, check out the documentation on PHP&#039;s site:

http://www.php.net/manual/en/language.operators.errorcontrol.php</description>
		<content:encoded><![CDATA[<p>@felix: thanks for the tip.</p>
<p>In case anyone else was like me and didn&#8217;t know what Felix is talking about, check out the documentation on PHP&#8217;s site:</p>
<p><a href="http://www.php.net/manual/en/language.operators.errorcontrol.php" rel="nofollow">http://www.php.net/manual/en/language.operators.errorcontrol.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felix Geisendörfer</title>
		<link>http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/comment-page-1/#comment-6361</link>
		<dc:creator>Felix Geisendörfer</dc:creator>
		<pubDate>Sun, 29 Apr 2007 15:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/04/28/define-your-own-for_layout-variables/#comment-6361</guid>
		<description>Swalled my tags : (:

echo @$var_for_layout;</description>
		<content:encoded><![CDATA[<p>Swalled my tags : (:</p>
<p>echo @$var_for_layout;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
