문제

How to generate sef url in joomla3.1 component? My route is here.

my_component/view/categories/category/catID/itemID
도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top