O'Reilly logo

CakePHP 1.3 Application Development Cookbook by Mariano Iglesias

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Sluggable behavior

One of the main concerns most applications have is optimizing their content for search engines, so that their sites rank as high as possible on most engines. Among several recommendations found in most SEO (Search Engine Optimization) guides, building URLs that include relevant keywords is one of the most effective ones.

If we are building a content-based site, this is achievable by making sure that permanent links to each item include most of the words that are part of the item title. As an example, if we have a post whose title is Top 10 CakePHP Behaviors, an SEO-friendly URL could be:

http://localhost/articles/view/top-10-cakephp-behaviors.

The top-10-cakephp-behaviors part is commonly known as a slug, a part of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required