How to get the url of Joomla Menu itemID?

How to get the url of Joomla Menu itemID?

New Issue
Joomla Support Alex
  • (1 Ratings)

How can I get the URL of Joomla Menu itemID provided by the user?

Thanks in advance!

1 Responses

PCMShaper

8 months ago #186

Hi,

Try below code:

$itemid = JRequest::getVar('Itemid');
$application = JFactory::getApplication();
$menu = $application->getMenu();
$item = $menu->getItem($itemid);
$link = new JURI($item->link);
$link->setVar( 'ItemId', $itemid );

Best Regards
PCMShaper Team

Submit Your Response