Reputation: 414
How to generate sef url in joomla3.1 component? My route is here.
my_component/view/categories/category/catID/itemID
Upvotes: 1
Views: 528
Reputation: 19733
To do this, you would use something like the following:
echo JRoute::_('index.php?option=com_mycomponent&view=categories&catid=20&Itemid=50');
Joomla will automatically turn this into a SEF URL using the JRoute()
class.
For more information on supporting SEF URL's with your component, have a read of this:
http://docs.joomla.org/Supporting_SEF_URLs_in_your_component
Hope this helps
Upvotes: 2