<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 18 May 2013 15:38:25 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Graham Bird's Blog: Extra-pretty URLs with slugs]]></title>
      <guid>http://www.phpdeveloper.org/news/5648</guid>
      <link>http://www.phpdeveloper.org/news/5648</link>
      <description><![CDATA[<p>
As the <a href="http://cakephp.org/">CakePHP framework</a> grows in popularity, more and more tutorials are show up for it, including <a href="http://www.grahambird.co.uk/cake/tutorials/slugs.php">this quick and handy one</a> from <i>Graham Bird</i>. In it, he explains the use of "slugs" instead of IDs to make URLs simpler to use and remember.
</p>
<blockquote>
<p>
In this tutorial you will learn how to use words rather than IDs in your Cake URLs. These words are known as "slugs" in Wordpress so I decided to call them slugs too.
</p>
<p>
Cake's normal URLs look like this: www.example.com/stories/read/123245221<br/>
and we are going to make them look like this: www.example.com/stories/read/sleepingbeauty
</p>
</blockquote>
<p>
Thanks to the simplicity of the framework, <a href="http://www.grahambird.co.uk/cake/tutorials/slugs.php">the tutorial</a> is pretty short, using one of CakePHP's "magic functions" to help cross-match the slug given with a table in the database with a slug/title relationship. There's not much code to it and he <a href="http://demo.grahambird.co.uk/stories">provides a demo</a. if you'd like to check it out first.
</p>]]></description>
      <pubDate>Wed, 21 Jun 2006 12:45:35 -0500</pubDate>
    </item>
  </channel>
</rss>
