<?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: CakePHP: PagesController with Admin Routing</title>
	<atom:link href="http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/</link>
	<description>fun and geekery</description>
	<lastBuildDate>Tue, 20 Jul 2010 21:22:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: weewew</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-12014</link>
		<dc:creator>weewew</dc:creator>
		<pubDate>Mon, 05 Jul 2010 07:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-12014</guid>
		<description>weweewewewew wewew wew ewew</description>
		<content:encoded><![CDATA[<p>weweewewewew wewew wew ewew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-11546</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 09 Jun 2010 11:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-11546</guid>
		<description>No idea why the class code didnt show, i&#039;ll try again without the php tags :)

&lt;code&gt;
require_once &#039;../../cake/libs/controller/pages_controller.php&#039;;

class AdmPagesController extends PagesController {
	var $name = &#039;AdmPages&#039;;

	public function admin_display(){
		//		parent::display(func_get_args());
		$vArgs = func_get_args();
		call_user_func_array(array(&#039;parent&#039;, &#039;display&#039;), $vArgs);
	}
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>No idea why the class code didnt show, i&#8217;ll try again without the php tags <img src='http://www.actionshrimp.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><code><br />
require_once '../../cake/libs/controller/pages_controller.php';</p>
<p>class AdmPagesController extends PagesController {<br />
	var $name = 'AdmPages';</p>
<p>	public function admin_display(){<br />
		//		parent::display(func_get_args());<br />
		$vArgs = func_get_args();<br />
		call_user_func_array(array('parent', 'display'), $vArgs);<br />
	}<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-11545</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 09 Jun 2010 11:53:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-11545</guid>
		<description>Hi,
In an ideal scenario, you would not override the PagesController, or repeat the code by copying and pasting it. I solved this problem by adding this to routes.php:

&lt;code&gt;
Router::connect(&#039;/admin/adm_pages/*&#039;, array(&#039;controller&#039; =&gt; &#039;adm_pages&#039;, &#039;action&#039; =&gt; &#039;display&#039;, &#039;admin&#039; =&gt; 1));
&lt;/code&gt;

Then i created this class, adm_pages_controller.php:

&lt;code&gt;

&lt;/code&gt;

and then added my view to app/views/adm_pages/help.ctp.

This way, if you need to update your cake version, as long as the file structure and display method prototype stays the same, it will work :-)</description>
		<content:encoded><![CDATA[<p>Hi,<br />
In an ideal scenario, you would not override the PagesController, or repeat the code by copying and pasting it. I solved this problem by adding this to routes.php:</p>
<p><code><br />
Router::connect('/admin/adm_pages/*', array('controller' =&gt; 'adm_pages', 'action' =&gt; 'display', 'admin' =&gt; 1));<br />
</code></p>
<p>Then i created this class, adm_pages_controller.php:</p>
<p><code></p>
<p></code></p>
<p>and then added my view to app/views/adm_pages/help.ctp.</p>
<p>This way, if you need to update your cake version, as long as the file structure and display method prototype stays the same, it will work <img src='http://www.actionshrimp.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-11411</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Wed, 02 Jun 2010 08:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-11411</guid>
		<description>Hi -- I know this is completely unrelated to your post here, but your \LaTeX renderer on your &quot;PhysiWiki&quot; appears to have gone down. I&#039;m a current third year about to sit the B1, B2, and B3 papers and I&#039;ve found your site incredibly useful for them -- please could you fix it!

A thank you from St. Hugh&#039;s!</description>
		<content:encoded><![CDATA[<p>Hi &#8212; I know this is completely unrelated to your post here, but your \LaTeX renderer on your &#8220;PhysiWiki&#8221; appears to have gone down. I&#8217;m a current third year about to sit the B1, B2, and B3 papers and I&#8217;ve found your site incredibly useful for them &#8212; please could you fix it!</p>
<p>A thank you from St. Hugh&#8217;s!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dddd</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-11212</link>
		<dc:creator>dddd</dc:creator>
		<pubDate>Sun, 16 May 2010 09:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-11212</guid>
		<description>with cake 1.3 there is no more routing.admin
http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3

you have to change the control in the beforeFilter function

        $routing_prefixes = Configure::read(&#039;Routing.prefixes&#039;);
        if(in_array(&quot;admin&quot;, $routing_prefixes)){
            $admin =&#039;admin&#039;;
        }</description>
		<content:encoded><![CDATA[<p>with cake 1.3 there is no more routing.admin<br />
<a href="http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3" rel="nofollow">http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3</a></p>
<p>you have to change the control in the beforeFilter function</p>
<p>        $routing_prefixes = Configure::read(&#8216;Routing.prefixes&#8217;);<br />
        if(in_array(&#8220;admin&#8221;, $routing_prefixes)){<br />
            $admin =&#8217;admin&#8217;;<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benny L.E.P</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-10802</link>
		<dc:creator>Benny L.E.P</dc:creator>
		<pubDate>Mon, 19 Apr 2010 17:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-10802</guid>
		<description>Thank you you saved my live with this code, thank you very much and god bless you for your kindness :)</description>
		<content:encoded><![CDATA[<p>Thank you you saved my live with this code, thank you very much and god bless you for your kindness <img src='http://www.actionshrimp.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-6145</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Mon, 18 May 2009 06:44:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-6145</guid>
		<description>Do you get any errors or anything? And did you have the beforeFilter in the AppController class given right at the start?</description>
		<content:encoded><![CDATA[<p>Do you get any errors or anything? And did you have the beforeFilter in the AppController class given right at the start?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francisco</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-6143</link>
		<dc:creator>Francisco</dc:creator>
		<pubDate>Sun, 17 May 2009 22:41:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-6143</guid>
		<description>Hi. I was trying to make it work in cakephp 1.2, but it didn&#039;t. I did exactly the example in a test app but no succeded.
I would like to make an admin home page with login in my app.

Thank you.</description>
		<content:encoded><![CDATA[<p>Hi. I was trying to make it work in cakephp 1.2, but it didn&#8217;t. I did exactly the example in a test app but no succeded.<br />
I would like to make an admin home page with login in my app.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Password protected static pages &#171; Myles Kadusale&#8217;s Blog</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-5972</link>
		<dc:creator>Password protected static pages &#171; Myles Kadusale&#8217;s Blog</dc:creator>
		<pubDate>Tue, 28 Apr 2009 09:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-5972</guid>
		<description>[...] Password protected static&#160;pages  Today I came across a nice tutorial on how to protect a static page with a password Click here [...]</description>
		<content:encoded><![CDATA[<p>[...] Password protected static&nbsp;pages  Today I came across a nice tutorial on how to protect a static page with a password Click here [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CakePHP Digest #12 - The Birthday Edition &#124; PseudoCoder.com</title>
		<link>http://www.actionshrimp.com/2009/04/cakephp-pagescontroller-with-admin-routing/comment-page-1/#comment-5921</link>
		<dc:creator>CakePHP Digest #12 - The Birthday Edition &#124; PseudoCoder.com</dc:creator>
		<pubDate>Tue, 21 Apr 2009 02:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.actionshrimp.com/?p=272#comment-5921</guid>
		<description>[...] is back with a tutorial on how to use the pages controller with admin routing. What I like most about their code is the lack of indention. It&#8217;s like they&#8217;re tossing [...]</description>
		<content:encoded><![CDATA[<p>[...] is back with a tutorial on how to use the pages controller with admin routing. What I like most about their code is the lack of indention. It&#8217;s like they&#8217;re tossing [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
