I would like to change the default url title format ie the capitalizatin of the url and want to replace the underscores with hyphen. ie Arts_Culture => arts-culture Web_Directory => web-directory Can anyone please tell me how to do it? Thanks
There are actually two ways you can accomplish this. 1. via the database run this: UPDATE `PLD_CATEGORY` SET `TITLE_URL`=replace(`TITLE_URL`,'_','-'); 2. within the main.tpl: {$cat.TITLE|replace:'_':'-'} either or will suffice
I'm sorry, I forgot to add that I'm using the Quick Subcategory Adder mod. If I'm to manually edit each URL's it is going to take me atleast a month to complete it.
{$cat.TITLE|replace:'_':'-'|lower} do the same this for the subcats too, ok? {$scat.TITLE|replace:'_':'-'|lower}
Thanks again an0n. On a second thought, in the second method won't the conversion be done every time the page is loaded? Isn't the first one a better solution?
It might be more trouble than it's worth. Doesn't Google see capital letters as seperate URLS from lower case? Are you already indexed? Anons database update will be a one shot deal.
as stated, the #1 is a one short directory update. #2 is an 'on the fly' smarty method. either or will work.
awesome codes .. i might use it too an0n ... thanks alot .. so we can remove the hyphen and underscore if we like ??