<?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: How to use a helper in a controller</title>
	<atom:link href="http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/</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/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-255586</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 20 Dec 2011 16:10:59 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-255586</guid>
		<description>@Jose: You&#039;re welcome :)</description>
		<content:encoded><![CDATA[<p>@Jose: You&#8217;re welcome :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-253176</link>
		<dc:creator>Jose</dc:creator>
		<pubDate>Wed, 14 Dec 2011 13:56:03 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-253176</guid>
		<description>Thanks a lot. I need id for build dinamic links relative to the users role in the authentication.</description>
		<content:encoded><![CDATA[<p>Thanks a lot. I need id for build dinamic links relative to the users role in the authentication.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: will</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-233665</link>
		<dc:creator>will</dc:creator>
		<pubDate>Sun, 23 Oct 2011 21:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-233665</guid>
		<description>awesome, thanks!</description>
		<content:encoded><![CDATA[<p>awesome, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-233619</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Sun, 23 Oct 2011 15:06:06 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-233619</guid>
		<description>@will: Thanks for your question!

I would use the following snippet:
&lt;code&gt;
$view = new View($this);
$html = $view-&gt;loadHelper(&#039;Html&#039;);
&lt;/code&gt;

Hope this helps!</description>
		<content:encoded><![CDATA[<p>@will: Thanks for your question!</p>
<p>I would use the following snippet:<br />
<pre><code>$view = new View($this);
$html = $view-&gt;loadHelper('Html');</code></pre>
<p>Hope this helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: will</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-233535</link>
		<dc:creator>will</dc:creator>
		<pubDate>Sun, 23 Oct 2011 05:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-233535</guid>
		<description>How would you do this in 2.0?

Using this method,  (which worked great for 1.3  btw) i get:

Argument 1 passed to Helper::__construct() must be an instance of View, null given

Will</description>
		<content:encoded><![CDATA[<p>How would you do this in 2.0?</p>
<p>Using this method,  (which worked great for 1.3  btw) i get:</p>
<p>Argument 1 passed to Helper::__construct() must be an instance of View, null given</p>
<p>Will</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-174170</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Sat, 11 Sep 2010 14:35:30 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-174170</guid>
		<description>@Stephen: Cool to hear this was useful for you :)</description>
		<content:encoded><![CDATA[<p>@Stephen: Cool to hear this was useful for you :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-173631</link>
		<dc:creator>Stephen</dc:creator>
		<pubDate>Wed, 08 Sep 2010 11:57:39 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-173631</guid>
		<description>I found this quite useful when dealing with the XML helper. 

This allowed me to generate an xml file, send it to ftp and have it picked up by our in house order processing system without having to generate a view for the controller.

Keep up the useful posts cakebaker</description>
		<content:encoded><![CDATA[<p>I found this quite useful when dealing with the XML helper. </p>
<p>This allowed me to generate an xml file, send it to ftp and have it picked up by our in house order processing system without having to generate a view for the controller.</p>
<p>Keep up the useful posts cakebaker</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-154125</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 25 Mar 2010 15:12:15 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-154125</guid>
		<description>@Jiruus: Well, you have to pass the id as third array element, see the &lt;a href=&quot;http://book.cakephp.org/view/836/link&quot; rel=&quot;nofollow&quot;&gt;documentation of the link method&lt;/a&gt;.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>@Jiruus: Well, you have to pass the id as third array element, see the <a href="http://book.cakephp.org/view/836/link" rel="nofollow">documentation of the link method</a>.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jiruus</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-154046</link>
		<dc:creator>Jiruus</dc:creator>
		<pubDate>Thu, 25 Mar 2010 06:05:14 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-154046</guid>
		<description>hii, 
&lt;code&gt;
echo &#039;&lt;li onClick=&quot;fill(\&#039;&#039;.addslashes($results[&#039;members&#039;][&#039;name&#039;]).&#039;\&#039;);&quot;&gt;&#039;.$html-&gt;link($results[&#039;members&#039;][&#039;name&#039;],array(&#039;controller&#039;=&gt;&#039;members&#039;,&#039;action&#039;=&gt; &#039;view&#039;)).&#039;&lt;/li&gt;&#039;;
&lt;/code&gt;

After running this code, when I&#039;m clicking on the result it will go to http://localhost/members/view .  but I can&#039;t pass the ID along with ,then only I can get the corresponding view of the member. like  http://localhost/members/view/2

plz help me</description>
		<content:encoded><![CDATA[<p>hii,<br />
<code>echo '&lt;li onClick="fill(\''.addslashes($results['members']['name']).'\');"&gt;'.$html-&gt;link($results['members']['name'],array('controller'=&gt;'members','action'=&gt; 'view')).'&lt;/li&gt;';</code></p>
<p>After running this code, when I&#8217;m clicking on the result it will go to <a href="http://localhost/members/view" rel="nofollow">http://localhost/members/view</a> .  but I can&#8217;t pass the ID along with ,then only I can get the corresponding view of the member. like  <a href="http://localhost/members/view/2" rel="nofollow">http://localhost/members/view/2</a></p>
<p>plz help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/comment-page-1/#comment-127194</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Wed, 06 May 2009 14:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/09/how-to-use-a-helper-in-a-controller/#comment-127194</guid>
		<description>@Brian: I&#039;m glad to hear this article was helpful for you!</description>
		<content:encoded><![CDATA[<p>@Brian: I&#8217;m glad to hear this article was helpful for you!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

