Url title problem
Posted: 15 January 2011 05:52 AM   [ Ignore ]
Circled in the Yearbook
RankRankRank
Total Posts:  702
Joined  2010-04-08

Hey Rob, when using SC in edit mode, and the title of an entry is changed, the entry url title isn’t updated to match the new title. How can I make it so? smile

Profile
 
 
Posted: 15 January 2011 06:51 AM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

This is just how EE works, you’ll see the same results if you do this in the CP. The reason being, once a url_title has been created, your site maybe been indexed by a search engine, and now that URL they are expecting is no longer there. You have to manually edit the url_title on an edit.

Profile
 
 
Posted: 15 January 2011 07:03 AM   [ Ignore ]   [ # 2 ]
Circled in the Yearbook
RankRankRank
Total Posts:  702
Joined  2010-04-08

Oh noooo. Any way I could use this: http://barrettnewton.com/products/create_url_title

Profile
 
 
Posted: 15 January 2011 07:49 AM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

No, that won’t work in real time. You could write your own javascript to do it, I guess:

$(function(){
    
$('input[name=title]').keyup(function(){
        
$('input[name=url_title]').val( $(this).val().replace(/\s/g'_').replace(/[^\w]/, '').toLowerCase() );
    
});
}); 
Profile