Answer the question
In order to leave comments, you need to log in
How to display menu items via API?
Is it possible to display the menu items for the current request?
you need something like:
/**
* @var $curPage string url of current page
* @var $menuType string type of menu
**/
function getMenuItems($curPageUrl, $menuType)
{
$result = [];
// ... здесь запрос на
return $result;
}
$obMenu = $APPLICATION->GetMenu(
'left',
true,
false,
'/'
); // object(CMenu)#72 (9) { ["type"]=> string(7) "footer2" ["arMenu"]=> array(0) { } ["bMenuCalc"]=> bool(false) ["MenuDir"]=> string(1) "/" ["MenuExtDir"]=> string(0) "" ["MenuTemplate"]=> string(0) "" ["template"]=> string(0) "" ["LAST_ERROR"]=> string(0) "" ["debug"]=> NULL }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question