How to get menu Itemid in your own components


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $url = 'index.php?option=[[option]]&view=[[view]]';
  2. $menu = $app->getMenu();
  3. $menuItem = $menu->getItems( 'link', $url, true );
  4. $Itemid = $menuItem->id;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.