SEF Advance extension for K2
Read on for examples and free download! So how are the new URLs better? We will show this on an example.
Let's say you have a category called Animals, under that a subcategory called Birds and finally two items there: Eagle and Hawk. The parent category Animals is linked to menu.
The regular K2 SEF URLs are right now like:
Animals (category): http://domain/animals
Birds (subcategory): http://domain/animals/itemlist/category/4-birds
Eagle (item): http://domain/animals/item/3-eagle
Hawk (item): http://domain/animals/item/4-hawk
With the new extension for SEF Advance you get:
Animals (category): http://domain/animals/
Birds (subcategory): http://domain/animals/birds/
Eagle (item): http://domain/animals/birds/eagle/
Hawk (item): http://domain/animals/birds/hawk/
It works for unlimited category depth. As you can see there are no IDs nor strange words in the URLs and they are far more logical reflecting your content structure. The other K2 views are also covered with improved URLs.
You will also notice there is no "k2" component prefix in the URLs which was the case in all previous extensions for 3rd party components. This is possible thanks to a new API format in SEF Advance which allows for this to be skipped (will require SEF Advance v2.3.1 or later). As K2 is often used as a replacement for Joomla's own content component and tightly connected to the core, I figured you will appreciate this feature as URLs become far more advanced and simple.
To install the extension just upload the provided file sef_ext.php to K2's component directoy: ./components/com_k2/
Don't forget to upgrade SEF Advance to the latest version too in order for the extension to work!
Current SEF Advance users can download the extension for free at our SEF extensions page.
New customers get SEF Advance here and then download extensions for 3rd party components at no additional charge.