Question

I want to get parameters of a specific menu in joomla3/k2

I can get current menu by this code:

$params = K2HelperUtilities::getParams('com_k2');

$_myparam=$params->get('menu-meta_url');

Now how can I call $params->get('menu-meta_url') form another page or module?!

Était-ce utile?

La solution

Well - if you just want to get the current menu params... you can use the default.

  $itemid = JRequest::getVar('Itemid');
  $menu = &JSite::getMenu();
  $active = $menu->getItem($itemid);
  $params = $menu->getParams( $active->id );
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top