Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The menu items have an advanced setting, where you can add additional options for each item. parameters
Well, for example, for the first-level link, set the parameter PARENT = CHILD_1
For second-level links, set the parameter CHILD = CHILD_1
In the menu component, all these parameters fall into the PARAMS array of each item, well, and there in result_modifier.php you compose as you need, figuratively depends already how you want to make the output in template.php
Example
foreach($arResult as $key => &$arItem) {
if(isset($arItem['PARAMS']['PARENT']) && $arItem['PARAMS']['PARENT']) {
$parents[$arItem['PARAMS']['PARENT']] = &$arItem;
}
if(isset($arItem['PARAMS']['CHILD']) && $arItem['PARAMS']['CHILD']) {
$parents[$arItem['PARAMS']['CHILD']]['CHILDS'][$key] = $arItem;
unset($arResult[$key]);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question