When you create a menu for any view of component, there are many options in the menu you can configure. These values can easily be accessed in Joomla code.

To access current menu parameters,

$app = JFactory::getApplication();
// Get active menu
$active = $app->getMenu()->getActive();
// Get params for active menu
$params = $active->params;
// Access param you want
$yourParameter = $params->get('yourParameter');

Standard Parameters

  • menu-anchor_title
  • menu-anchor_css
  • menu_image
  • menu_image_css
  • menu_text
  • menu_show
  • page_title
  • show_page_heading
  • page_heading
  • pageclass_sfx
  • menu-meta_description
  • menu-meta_keywords
  • robots
  • secure

To access Menu parameters from a known Itemid:

$app = JFactory::getApplication();
// Get Itemid from URL
$input = JFactory::getApplication()->input;
$itemId = $input->get->get('Itemid', '0', 'INT');
// Get menu from Itemid
$menuItem = $app->getMenu()->getItem($itemId);
// Get params for menuItem
$params = $menuItem->params;
// Access param you want
$yourParameter = $params->get('yourParameter');