<?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 &#8211; Static pages under the root</title>
	<atom:link href="http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/feed/" rel="self" type="application/rss+xml" />
	<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/</link>
	<description>Linux, open source, development, coding, beer and other stuff</description>
	<lastBuildDate>Thu, 06 Oct 2011 00:03:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: dam</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-74</link>
		<dc:creator>dam</dc:creator>
		<pubDate>Wed, 28 Oct 2009 13:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-74</guid>
		<description>hi can i use the static pages in side in controller bu i need to run this controller before giving the database details its possible to do ???

mypage/photos

this controller will run  with out giving the db info inthe database.php file can i run this controller ???


i write the router also if i give the db inofo correctly mans its running else its trough error &quot;Requires a Database Connection&quot; how can i solve

help me</description>
		<content:encoded><![CDATA[<p>hi can i use the static pages in side in controller bu i need to run this controller before giving the database details its possible to do ???</p>
<p>mypage/photos</p>
<p>this controller will run  with out giving the db info inthe database.php file can i run this controller ???</p>
<p>i write the router also if i give the db inofo correctly mans its running else its trough error &#8220;Requires a Database Connection&#8221; how can i solve</p>
<p>help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonah Turnquist</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-72</link>
		<dc:creator>Jonah Turnquist</dc:creator>
		<pubDate>Sat, 31 May 2008 17:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-72</guid>
		<description>This is how I am going to do it:

In the routes file I commented out these two separate lines:
//Router::connect(&#039;/&#039;, array(&#039;controller&#039; =&gt; &#039;pages&#039;, &#039;action&#039; =&gt; &#039;display&#039;, &#039;home&#039;));
//Router::connect(&#039;/pages/*&#039;, array(&#039;controller&#039; =&gt; &#039;pages&#039;, &#039;action&#039; =&gt; &#039;display&#039;));

And I now have this line instead:
Router::connect(&#039;/&#039;, array(&#039;controller&#039; =&gt; &#039;pages&#039;));

So now if I want an /about page I add this route:
Router::connect(&#039;/about&#039;, array(&#039;controller&#039; =&gt; &#039;pages/about&#039;));

Now /about routes to PagesController-&gt;about() and uses the pages/about.ctp view

Using this method means you have to create a new route for each static page.

Also now the home page will route to PagesController-&gt;index()</description>
		<content:encoded><![CDATA[<p>This is how I am going to do it:</p>
<p>In the routes file I commented out these two separate lines:<br />
//Router::connect(&#8216;/&#8217;, array(&#8216;controller&#8217; =&gt; &#8216;pages&#8217;, &#8216;action&#8217; =&gt; &#8216;display&#8217;, &#8216;home&#8217;));<br />
//Router::connect(&#8216;/pages/*&#8217;, array(&#8216;controller&#8217; =&gt; &#8216;pages&#8217;, &#8216;action&#8217; =&gt; &#8216;display&#8217;));</p>
<p>And I now have this line instead:<br />
Router::connect(&#8216;/&#8217;, array(&#8216;controller&#8217; =&gt; &#8216;pages&#8217;));</p>
<p>So now if I want an /about page I add this route:<br />
Router::connect(&#8216;/about&#8217;, array(&#8216;controller&#8217; =&gt; &#8216;pages/about&#8217;));</p>
<p>Now /about routes to PagesController-&gt;about() and uses the pages/about.ctp view</p>
<p>Using this method means you have to create a new route for each static page.</p>
<p>Also now the home page will route to PagesController-&gt;index()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-73</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Tue, 18 Dec 2007 16:44:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-73</guid>
		<description>I&#039;ve been looking for an alternative to the /pages/ thing (which certainly does suck). Like Daniel, I&#039;m also leaning towards the route solution. Tat seems much more elegant than picking up from an error condition.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been looking for an alternative to the /pages/ thing (which certainly does suck). Like Daniel, I&#8217;m also leaning towards the route solution. Tat seems much more elegant than picking up from an error condition.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Criconet</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-71</link>
		<dc:creator>Daniel Criconet</dc:creator>
		<pubDate>Wed, 01 Aug 2007 17:50:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-71</guid>
		<description>My alternative of choice was to turn around Siruuk&#039;s solution: I preferred to create a route for each controller, and finally catch the &quot;/*&quot; urls routing them to the pages controller. From an effort point of view I consider the route as just one more step in the setup of each model/view/controller set, whereas I don&#039;t want to have to create a route for each static page.</description>
		<content:encoded><![CDATA[<p>My alternative of choice was to turn around Siruuk&#8217;s solution: I preferred to create a route for each controller, and finally catch the &#8220;/*&#8221; urls routing them to the pages controller. From an effort point of view I consider the route as just one more step in the setup of each model/view/controller set, whereas I don&#8217;t want to have to create a route for each static page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siruuk</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-70</link>
		<dc:creator>Siruuk</dc:creator>
		<pubDate>Fri, 05 Jan 2007 13:53:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-70</guid>
		<description>Hi,
with your method I cannot use $this-&gt;viewVars to pass data from the static page to the layout.

Why would I do that? Well I&#039;d like to take advantage of the general layout, as a template, but using particular content for every &quot;static&quot; page, with a particular ccs.

For example, the page about, is static but I&#039;d like to use the general layout plus a particular css espefic to that page...

So far I haven&#039;t found a way to do it other than creating a single rout for every static page.

Thank you, anyway ;-)</description>
		<content:encoded><![CDATA[<p>Hi,<br />
with your method I cannot use $this-&gt;viewVars to pass data from the static page to the layout.</p>
<p>Why would I do that? Well I&#8217;d like to take advantage of the general layout, as a template, but using particular content for every &#8220;static&#8221; page, with a particular ccs.</p>
<p>For example, the page about, is static but I&#8217;d like to use the general layout plus a particular css espefic to that page&#8230;</p>
<p>So far I haven&#8217;t found a way to do it other than creating a single rout for every static page.</p>
<p>Thank you, anyway <img src='http://john-hunt.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikee Freedom</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-69</link>
		<dc:creator>Mikee Freedom</dc:creator>
		<pubDate>Mon, 04 Sep 2006 05:21:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-69</guid>
		<description>Surely there must be a method using the native CakePHP routing. Have you asked in the Google Groups?

I have currently employed your method successfully so thank you very much for that. Let me know if you find another way.</description>
		<content:encoded><![CDATA[<p>Surely there must be a method using the native CakePHP routing. Have you asked in the Google Groups?</p>
<p>I have currently employed your method successfully so thank you very much for that. Let me know if you find another way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-68</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 24 Aug 2006 16:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-68</guid>
		<description>This is of course only if you want the pages to take on the site&#039;s template etc..</description>
		<content:encoded><![CDATA[<p>This is of course only if you want the pages to take on the site&#8217;s template etc..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Webmaster</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-67</link>
		<dc:creator>Webmaster</dc:creator>
		<pubDate>Fri, 04 Aug 2006 07:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-67</guid>
		<description>Thanks, I was also looking for information on how to create static pages in CakePHP.</description>
		<content:encoded><![CDATA[<p>Thanks, I was also looking for information on how to create static pages in CakePHP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Hofstetter</title>
		<link>http://john-hunt.com/2006/07/27/cakephp-static-pages-under-the-root/comment-page-1/#comment-66</link>
		<dc:creator>Daniel Hofstetter</dc:creator>
		<pubDate>Thu, 27 Jul 2006 19:42:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.john-hunt.com/uncategorized/2006/07/27/cakephp-static-pages-under-the-root/#comment-66</guid>
		<description>You can put your static files also in app/webroot.</description>
		<content:encoded><![CDATA[<p>You can put your static files also in app/webroot.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

