开发者

How to make a correct Joomla URL using the Joomla Classes

I am busy making a Joomla! component. And know i want to link to another component. So, as example i want to link from my component 'my_component' to 'his_component'. Normally this is simple to do. Just make a normal link like href="?option=com_his_component". But the problem is that on开发者_如何学编程e of my consumers uses SEO friendly URLs. And in that case this URL won't work.

Does anyone know a way to this the correct way (I think with the Joomla! Api)


Just wrap that link with a call to JRoute::_($url):

$link = JRoute::_('index.php?option=com_his_component&foo=bar');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜