Revision #5 has been created by Orteko on Oct 17, 2010, 10:05:20 AM with the memo:
Added SEO tag
« previous (#4) next (#6) »
Using search engine and user friendly URLs
[...]With the above approach, we can achieve very flexible URL schemes while keeping our code clean. If some day we want to change the format of the detail page URL (e.g., besides title, we also want to add category information into the URL), we can immediately accomplish this by updating only the `getUrl()` method in the base class. If, a model has a very special format for its detail page URL, we can override the `getUrl()` method in this model class.
Finally, it may also be a good idea to implement in the model classes the methods that return other type of URLs. For example, we can implement the `getListUrl()` method in the base class similar to what we do for `getUrl()`. Then we can readily obtain the list page URL for `Post` model using the expression `Post::model()->listUrl`.