NYCPHP Meetup

NYPHP.org

[nycphp-talk] Joomla and SE Friendly URLs

Gary Mort bz-gmort at beezifies.com
Fri Jan 11 08:09:43 EST 2008


Well, first off as the local organizer for the NYC Joomla User Group, 
I'd point you over to the Joomla mailling list also sponsored and 
maintained by NYPHP(you can subscribe to it from their site).

As to your question, SEF in the Joomla world works in 1 of 2 ways:

1) The ugly way.  Using native Joomla SEF, all it does is convert 
keywords to the url, so 
http://www.mysite.com/index.php?options=content&task=view&id=5 becomees
http://www.mysite.com/options/content/task/view/id/5

2) The "smart" way = you use a 3rd party Joomla component that can 
create pretty urls.
These components typically have a default way of doing things. They also 
are extendable for each component, a component author or consultant 
working on the project can create a specific file(for example, if your 
component is called books, the file would be sef_books.php) and that 
file implements a class with 2 functions.  One function takes a Joomla 
url and prettifies it, and the other takes a pretty url and Joomlafies 
it.  They generally do this is a very simple way, they are called with 
the url, and return an array to prettify it.  The SEF component than 
pops the array and builds the url.
For example:
books
showbook
php_hacks

Would become: http://www.mydomain.com/books/showbook/php_hacks.html

This means as a /user/ your at the mercy of what configuration options 
were created by the author of the sef class for the components your 
using used.

As a developer, you are free to edit that very very small file and 
completely rearrange the ordering to suit your fancy.




More information about the talk mailing list