sábado, 3 de marzo de 2007

Joomla! Developer Blog: Joomla! 1.5 Accessibility - Look Ma no Itemid’s

Joomla! has always been rightfully criticized for the fact that it’s not capable of generating humanly readable and search engine optimized URL’s out of the box. Alot of the problems with the implementation of humanly readable URL’s is related to what we call the itemid. For those who don’t know what an Itemid is :

An itemid is a unique identifier for a menu item in Joomla!. Technically an itemid is nothing more then the value of the ‘id’ field in the menu database table.

Itemid’s are one of those things in Joomla! that reached almost a mythical status over time. Dozen of posts can be found on the forums discussing the problems they cause and how they effect SEO (search engine optimisation) or SEF (search engine friendly URL’s). We even have a FAQ on the forum that outlines problems related to Itemid’s and a discussion that outlines possible solutions can also be found.

We always said that we would only tackle the Itemid issues in a future version of Joomla! as they require architectural changes that would compromise backwards compatibility beyond the scope of 1.5. Well we lied !

In the last 6 weeks I have been working hard on refactoring the whole Itemid and URL creating mechanism in Joomla! 1.5. This has resulted in a system that is capable of generating URL’s that are :

  • permanent
  • readable
  • hierarchical
  • brief and clean

The new API is fully backwards compatible and can be easily implemented by component developers that are updating their components for 1.5. That’s right, even your existing components can make use of this ! It can also easily be decorated/extended through a system plugin. No more hacking of the core, solutions like OpenSEF can now truly focus on becoming true URL management extensions. Which is what they are in the first place.

So how do these new URL’s look like ? Well here are some example :

  1. http://localhost/joomla15/index.php/web-links/2_joomla-specific-links/1_joomla
  2. http://localhost/joomla15/index.php/the-news/joomla-overview/faq
  3. ttp://localhost/joomla15/index.php/faq/31_general/33_what-is-uncategorised-content
  4. http://localhost/joomla15/index.php/news-feeds/4_joomla/1_joomla-official-news

Aren’t they beautifull ?

Wanna test this yourself ? Simply download a nightly build and don’t forget to turn ’search engine friendly URL’s on’ in the configuration. You can find this in the site tab.

For the coders among you who want to read up about the magic behind this new system and the way it can be used or extended, please head down to the 1.5 development forums and look for the Itemid refactoring in 1.5 thread. More documentation about the news ways of handling URL’s in 1.5 is forthcoming. As always the truth is out there (read in the SVN).

Finally I would like to thank all of you we have provided constructive feedback in the last 6 weeks to help make this happen. We have seen a lot of people criticize our URL handling mechanism in the past, only a handful of you have put their money where their mouth is and helped create a solution. Even if you didn’t understood all of it, at least you have tried, in true hacker spirit !

No hay comentarios.: