<?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: The Secret of CakePHP Advanced Routing &#8211; Even Better URLs</title>
	<atom:link href="http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/</link>
	<description>Quick and Dirty Web Development for Web 2.0: CakePHP, Prototype, JQuery, and lots more.</description>
	<lastBuildDate>Mon, 15 Mar 2010 04:27:24 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Josenivaldo Benito Jr.</title>
		<link>http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/comment-page-1/#comment-28163</link>
		<dc:creator>Josenivaldo Benito Jr.</dc:creator>
		<pubDate>Mon, 07 Dec 2009 21:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.WebDevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/#comment-28163</guid>
		<description>@web forum

In this case, your home page is not a static page. It contains dynamic data (from other models). In order to solve this I probably would create a specific controller for the home page that query data from other models (binding and calling specific methods of each model). These data would be passed to a view (index) which would be composed by elements (each one being a model widget). As you may guessed the view should call each element passing the corresponding model data variable as parameter.

Due the elements, queries and data manipulation necessary to accomplish this task I think pages_controller should not be used (even being perfectly suitable for). Create a specific controller for this situation is a clear pretty way to do it.

After all you just connect you controller index method to the url you want. For a home page example something like below might solve:

Router::connect(&#039;/&#039;, array(&#039;controller&#039; =&gt; &#039;my_new_controller&#039;, &#039;action&#039; =&gt; &#039;index&#039;));

And, for sure, remove the similar entry point &quot;/&quot; to pages_controller display action.

Regards,
Benito</description>
		<content:encoded><![CDATA[<p>@web forum</p>
<p>In this case, your home page is not a static page. It contains dynamic data (from other models). In order to solve this I probably would create a specific controller for the home page that query data from other models (binding and calling specific methods of each model). These data would be passed to a view (index) which would be composed by elements (each one being a model widget). As you may guessed the view should call each element passing the corresponding model data variable as parameter.</p>
<p>Due the elements, queries and data manipulation necessary to accomplish this task I think pages_controller should not be used (even being perfectly suitable for). Create a specific controller for this situation is a clear pretty way to do it.</p>
<p>After all you just connect you controller index method to the url you want. For a home page example something like below might solve:</p>
<p>Router::connect(&#8216;/&#8217;, array(&#8216;controller&#8217; =&gt; &#8216;my_new_controller&#8217;, &#8216;action&#8217; =&gt; &#8216;index&#8217;));</p>
<p>And, for sure, remove the similar entry point &#8220;/&#8221; to pages_controller display action.</p>
<p>Regards,<br />
Benito</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: web forum</title>
		<link>http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/comment-page-1/#comment-28078</link>
		<dc:creator>web forum</dc:creator>
		<pubDate>Mon, 30 Nov 2009 00:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.WebDevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/#comment-28078</guid>
		<description>need some more guidance on how to creating home page having all widgets of other  models</description>
		<content:encoded><![CDATA[<p>need some more guidance on how to creating home page having all widgets of other  models</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Lloyd</title>
		<link>http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/comment-page-1/#comment-27946</link>
		<dc:creator>Kevin Lloyd</dc:creator>
		<pubDate>Mon, 31 Aug 2009 14:02:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.WebDevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/#comment-27946</guid>
		<description>Very good question Mr. Matt. Let me enlighten you.
A couple things you may note:
1. As you can see, this is used on the &quot;pages&quot; controller, which by definition, is used for static HTML pages. So, the terms &quot;RESTful&quot; and &quot;application&quot; don&#039;t apply.

2. About cluttering up the URL and UX. It is easy to argue that going from &quot;www.site.com/pages/page&quot; to &quot;www.site.com/page.htm&quot; will both unclutter the URL and enhance the UX

3. I think you mean &quot;content type&quot; is about telling the browser what type of file they&#039;re dealing with.

4. Not everything from 1999 is horrible.</description>
		<content:encoded><![CDATA[<p>Very good question Mr. Matt. Let me enlighten you.<br />
A couple things you may note:<br />
1. As you can see, this is used on the &#8220;pages&#8221; controller, which by definition, is used for static HTML pages. So, the terms &#8220;RESTful&#8221; and &#8220;application&#8221; don&#8217;t apply.</p>
<p>2. About cluttering up the URL and UX. It is easy to argue that going from &#8220;www.site.com/pages/page&#8221; to &#8220;www.site.com/page.htm&#8221; will both unclutter the URL and enhance the UX</p>
<p>3. I think you mean &#8220;content type&#8221; is about telling the browser what type of file they&#8217;re dealing with.</p>
<p>4. Not everything from 1999 is horrible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noam</title>
		<link>http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/comment-page-1/#comment-27945</link>
		<dc:creator>Noam</dc:creator>
		<pubDate>Mon, 31 Aug 2009 13:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.WebDevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/#comment-27945</guid>
		<description>you might want to know how to do what you don&#039;t wanna do.. ;)</description>
		<content:encoded><![CDATA[<p>you might want to know how to do what you don&#8217;t wanna do.. <img src='http://www.webdevelopment2.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/comment-page-1/#comment-27944</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 31 Aug 2009 13:00:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.WebDevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/#comment-27944</guid>
		<description>why would you want to add a .htm file extension?  That totally goes against creating a RESTful style application.  File extensions are about telling a browser or an OS what type of file they&#039;re dealing with....why clutter up the url with technical data like that?  Bad for UX, bad for SEO and totally 1999.</description>
		<content:encoded><![CDATA[<p>why would you want to add a .htm file extension?  That totally goes against creating a RESTful style application.  File extensions are about telling a browser or an OS what type of file they&#8217;re dealing with&#8230;.why clutter up the url with technical data like that?  Bad for UX, bad for SEO and totally 1999.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noam</title>
		<link>http://www.webdevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/comment-page-1/#comment-27928</link>
		<dc:creator>Noam</dc:creator>
		<pubDate>Wed, 29 Jul 2009 06:17:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.WebDevelopment2.com/the-secret-of-cakephp-advanced-routing-even-better-urls/#comment-27928</guid>
		<description>Thank you very much,Very Usefull!</description>
		<content:encoded><![CDATA[<p>Thank you very much,Very Usefull!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
