As soon as I click on the \"Media\" item in my main menu, the following url is generated:
http://test.local/index.php/media-files
Now, I would like to creat
I think this might be what you want:
$app = JFactory::getApplication(); $menu = $app->getMenu()->getActive()->link; echo JRoute::_($menu);
I've tested this as well, so let me know if it's what you require.