Recommended

The best Joomla! software around!

 

Shape 5 - Joomla Templates & More

 

Joomla 1.5 Components

 

iJoomla Components

Let's connect!

facebook-iconlinkedin-icon

Current users

We have 3 guests online

Please support us

Thank you for your donation.

Amount: 

How to prevent Joomla from changing your title alias to lowercase PDF Print E-mail
Written by Administrator   
Monday, 07 September 2009 00:00

I ran into this situation a few days ago, working for Curves, the largest fitness franchise in the world. An online and offline marketing campaign was created, with printed flyers holding the url of several new landing pages. But what we didn't notice is that the urls were written with a capital in it. And at the point where I mentioned 'Oh, I'm not sure if it will work this way', my collegues started to get a bit nervous.

 

To make clear what was actually going on, this is the example:

 

http://wwww.yoursite.com/Landingpage is not the same as http://www.yoursite.com/landingpage. In fact, using the Joomla Search Engine Friendly urls, Joomla uses a lowercase version of your title in the alias field. And that one is used for the url. Doesn't matter if you overwrite it with a capital, Joomla will still overwrite it when saving your article.

 

So, we need to fix that, but how? I'm not sure if any 3rd party SEF components can help you on this. Should be possible I suppose. If you're not using one you have the possibility to make a little change on a Joomla Core file. A What? Yes, a little change on the Joomla source code, after all it ís open source...

First, make a backup copy of the file filterout.php. You can find it in the librariesjoomlafilter folder of your joomla installation. I repeat and cannot repeat enough: do not skip this step, even if it all seems so easy. Which it is, but I do not want you to blame me for a ruined Joomla install. And document what you are doing. You MUST have a kind of documentation for your websites where you're filing everything you need to remember. Please file this core hack in there as well, cause there's a pretty good chance that your change will be overwritten on the next Joomla update.

 

Ok, enough concerns, let's make our change that we need!
The line of code you are looking for is:

 


{codecitation}$str = trim(strtolower($str));
return $str;

{/codecitation}


Change this to:


{codecitation}$str = trim($str);
return $str;

{/codecitation}

 

Save the file.

That's all! From now on Joomla will no longer create a lowercase alias anymore, but keep it the same as in your title. And at least now you can decide wheter you want to have capitals or not.

 

 

Last Updated on Thursday, 10 September 2009 22:50
 

Buy Joomla templates right here!