<?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: Rendering elements from controllers</title>
	<atom:link href="http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:12:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-142605</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 22 Dec 2009 16:06:44 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-142605</guid>
		<description>@Laurent: You are welcome :)</description>
		<content:encoded><![CDATA[<p>@Laurent: You are welcome :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Kretz</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-142596</link>
		<dc:creator>Laurent Kretz</dc:creator>
		<pubDate>Tue, 22 Dec 2009 11:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-142596</guid>
		<description>It does, thanks.
But my biggest point of misunderstanding was that I thought cake could by itself (on ajax call) update an element in a view.
I understood that it returns the content, and that I have to update the element in the call back of the jQuery function.

Thanks !</description>
		<content:encoded><![CDATA[<p>It does, thanks.<br />
But my biggest point of misunderstanding was that I thought cake could by itself (on ajax call) update an element in a view.<br />
I understood that it returns the content, and that I have to update the element in the call back of the jQuery function.</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-142547</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Mon, 21 Dec 2009 16:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-142547</guid>
		<description>@Laurent: I&#039;m not sure I understand your use case correctly. But if you use the &lt;a href=&quot;http://docs.jquery.com/Post&quot; rel=&quot;nofollow&quot;&gt;post function&lt;/a&gt; (assuming you are using jQuery) to post comments, then you could specify a callback function in which you can update the comments element if the post was successful.

Does this help?</description>
		<content:encoded><![CDATA[<p>@Laurent: I&#8217;m not sure I understand your use case correctly. But if you use the <a href="http://docs.jquery.com/Post" rel="nofollow">post function</a> (assuming you are using jQuery) to post comments, then you could specify a callback function in which you can update the comments element if the post was successful.</p>
<p>Does this help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-142396</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Fri, 18 Dec 2009 18:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-142396</guid>
		<description>Hi!
Your post is the closer I got to what i&#039;m looking for: would you happen to know if i can reload an element from an ajax call within the element itself ? without reloading the whole view of course ?

Maybe this is more clear: my view has thee elements: a photo, info about the photo, and comments. Once comments are added (via ajax), i&#039;d like the controller to reload the comment element only.

Sounds anal, but can&#039;t find anything... 
Thx!!</description>
		<content:encoded><![CDATA[<p>Hi!<br />
Your post is the closer I got to what i&#8217;m looking for: would you happen to know if i can reload an element from an ajax call within the element itself ? without reloading the whole view of course ?</p>
<p>Maybe this is more clear: my view has thee elements: a photo, info about the photo, and comments. Once comments are added (via ajax), i&#8217;d like the controller to reload the comment element only.</p>
<p>Sounds anal, but can&#8217;t find anything&#8230;<br />
Thx!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bookmarks about Elements</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-107303</link>
		<dc:creator>Bookmarks about Elements</dc:creator>
		<pubDate>Sun, 21 Sep 2008 13:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-107303</guid>
		<description>[...] - bookmarked by 4 members originally found by porkchop2f on 2008-09-06  Comment on Rendering elements from controllers by Websites tagged ...  http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-103482 - [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; bookmarked by 4 members originally found by porkchop2f on 2008-09-06  Comment on Rendering elements from controllers by Websites tagged &#8230;  <a href="http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-103482" rel="nofollow">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-103482</a> &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Websites tagged "controllers" on Postsaver</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-103482</link>
		<dc:creator>Websites tagged "controllers" on Postsaver</dc:creator>
		<pubDate>Mon, 18 Aug 2008 04:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-103482</guid>
		<description>[...] Controllers Prefer Springsteen And Sting Over George ... saved by romanedirisinghe2008-08-13 - Comment on Rendering elements from controllers by Wizualizacje 3d saved by pmg1232008-08-10 - penguin united release the quad station for the wii controllers. saved [...]</description>
		<content:encoded><![CDATA[<p>[...] Controllers Prefer Springsteen And Sting Over George &#8230; saved by romanedirisinghe2008-08-13 &#8211; Comment on Rendering elements from controllers by Wizualizacje 3d saved by pmg1232008-08-10 &#8211; penguin united release the quad station for the wii controllers. saved [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wizualizacje 3d</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-101253</link>
		<dc:creator>Wizualizacje 3d</dc:creator>
		<pubDate>Thu, 31 Jul 2008 12:10:52 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-101253</guid>
		<description>I must try this.</description>
		<content:encoded><![CDATA[<p>I must try this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-82655</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 15 Apr 2008 15:28:34 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-82655</guid>
		<description>@chanon: Strange, that it doesn&#039;t work for you and that it works here. I have seen your ticket, and so I hope the devs can figure out what the cause of this issue is.</description>
		<content:encoded><![CDATA[<p>@chanon: Strange, that it doesn&#8217;t work for you and that it works here. I have seen your ticket, and so I hope the devs can figure out what the cause of this issue is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chanon</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-82573</link>
		<dc:creator>chanon</dc:creator>
		<pubDate>Tue, 15 Apr 2008 08:30:51 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-82573</guid>
		<description>I&#039;ve found the workaround, just use the $file parameter:
$this-&gt;render(null, &#039;ajax&#039;, VIEW . /elements/example.ctp);</description>
		<content:encoded><![CDATA[<p>I&#8217;ve found the workaround, just use the $file parameter:<br />
$this-&gt;render(null, &#8216;ajax&#8217;, VIEW . /elements/example.ctp);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chanon</title>
		<link>http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/comment-page-1/#comment-82448</link>
		<dc:creator>chanon</dc:creator>
		<pubDate>Mon, 14 Apr 2008 17:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/12/21/rendering-elements-from-controllers/#comment-82448</guid>
		<description>OK, I can confirm that it is not my code.

The problem is that 
$this-&gt;render(&#039;/elements/example&#039;);
is now trying to find the file at
/app/views/controllername/elements/example.ctp
instead of
/app/views/elements/example.ctp
which is not how it used to be.
(ex. like in your above article)

This isn&#039;t what I want as the element I want to render is common to many controllers.</description>
		<content:encoded><![CDATA[<p>OK, I can confirm that it is not my code.</p>
<p>The problem is that<br />
$this-&gt;render(&#8216;/elements/example&#8217;);<br />
is now trying to find the file at<br />
/app/views/controllername/elements/example.ctp<br />
instead of<br />
/app/views/elements/example.ctp<br />
which is not how it used to be.<br />
(ex. like in your above article)</p>
<p>This isn&#8217;t what I want as the element I want to render is common to many controllers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

