Can you please tell me how the menu items are displayed in cms Umi? I need to swap the menu links but nowhere can I find the file ... Here is the code:

<div class="container clear"> <nav class="main-nav f-left"> <div class="mobile-menu"> <p>Главное меню</p> <div class="icon"></div> </div> <ul> <?php foreach ($this->macros('content', 'menu', array(null, 4, false, false, 1))['items']['nodes:item'] as $item) { // $name = str_replace("Выполненные работы по лестницам","Выполненные работы", $item['@name']); // $name = str_replace("Блог лестничников","Статьи по лестницам", $name); $active = (!is_null($pageCurrent) && $item['@id'] == $pageCurrent->getId()) || $item['@id'] == "3197" ? "class='active'" : ""; echo '<li ' . $active . '><a href="'.$item['@link'] . '">' . $item['@name'] . '</a>'; if ($item['items']['nodes:item'][0]) { echo '<ul class="submenu">'; foreach ($item['items']['nodes:item'] as $child) { echo '<li><a href="'.$child['@link'] . '">' . $child['@name'] . '</a>'; if ($child['items']['nodes:item'][0]) { echo '<ul class="submenu">'; foreach ($child['items']['nodes:item'] as $child2) { echo '<li><a href="'.$child2['@link'] . '">' . $child2['@name'] . '</a>'; if ($child2['items']['nodes:item'][0]) { echo '<ul class="submenu">'; foreach ($child2['items']['nodes:item'] as $child3) { echo '<li><a href="'.$child3['@link'] . '">' . $child3['@name'] . '</a></li>'; } echo '</ul>'; } echo '</li>'; } echo '</ul>'; } echo '</li>'; } echo '</ul>'; } echo "</li>"; } ?> </ul> </nav> </div> </div> 

  • Not sure I understood the question correctly, but the menu is generated based on the site tree and is not stored in the file - Arthur Shiriev

1 answer 1

The sequence of output elements for the content / menu macro is determined by the position of the page in the site structure.

To change the order of the links in the menu, change the order of the pages in the (Structure) module [ https://www.umi-cms.ru/product/modules/content/] . Or use to create a menu module (Menu) [ https://www.umi-cms.ru/product/modules/menu/]