Seo Url By Title
Posted 09 November 2012 - 05:44 AM
I want to use the pages title to generate seo url link.
But the title may has spaces, & and other special characters and I want to replaced by "-" (according to seo url rules)
Is there function/or method in Yii to make that or I should write my own php function ?
Posted 09 November 2012 - 07:21 AM
Yes I had found a few extensions but I want use native Yii function
Nevermind I have wrote my own function that is like with yiibehaviorsluggable functionality
Posted 09 November 2012 - 06:25 PM
Thank you Redguy for your suggestion.
I know the Yii is not another CMS. I used CMS before turn to the Yii framework
I would like to generate automatically the url by title rather than to store by use title/content/meta tags/etc .. and one more field? the url path! (to many fields for one article!)
So the way I preferred was to generate the url by title replace spaces, & . and other special characters by '-' plus id of content
Then I manipulate the url in action of controller and check only for id, loading the appropriate model and everything works!