Can anyone let me know that if the url rewriting is enabled in joomla and the url getting generated are seo friendly url's then in this case can I get menu item id if yes then what are the steps to get it.
for example my seo friendly url is www.example.com/store
I want to get menu item id from this url.
To get all variable
$Itemid = JRequest::getVar('Itemid');
To get the active menu
$app = JFactory::getApplication();
$menu = $app->getMenu()->getActive()->id;
echo $menu;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With