Custom Components and SEF URLs

If you are writing your own components, there a couple of things that you need to do to make the component work with the Joomla! built-in SEF functionality and 3rd party SEF components.  We learned the hard way.

In order to invoke Joomla! to convert urls like:

http://www.buentec.com/index.php?Itemid=123&id=68&option=com_content&task=view

into human readable and SEF urls like:

http://www.buentec.com/joomla-hacks/custom-access-for-groups-in-joomla

you have to invoke the Joomla! method

sefRelToAbs($link)

This method converts the URL first to:

http://www.buentec.com/content/view/68/123/

before passing it to any 3rd party SEF component that you may be using.  The other thing that you have to remember about using

sefRelToAbs($link)

is that you must pass it a full URL including the domain for your site.

Choosing the Right 3rd Party SEF Extension.

As part of a recent project we tried just about every SEF component out there, including one that we purchased.  Because the project invoved rebuilding a high traffic ASP.NET site in Joomla! with 2 custom components, we had very specific requirements about the way that the URLs on the site would be composed.  To make the transition as smooth as possible, we needed new dynamically generated content to assume the URLs of old content witht the .aspx suffix.  In the end we wound up using sh404SEF.  This component stood out for our purposes both in terms of functionality, but perhaps more importantly in level of documentation offered on their web site.   There is a good review of sh404SEFa good review of sh404SEF available from Alledia.  You can visit the sh404SEF site herevisit the sh404SEF site here .