W
W
webquestions2015-10-24 22:11:32
PHP
webquestions, 2015-10-24 22:11:32

Not a standard structure in the Bitrix menu, how to integrate such a layout?

there is a menu with such structure

<ul class="nav navbar-nav">
          <li class="dropdown active"> <a href="index.html">Home</a>
          </li>
      <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle js-activated">11111<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="">11111</a></li>
              <li><a href="">11111</a></li>
            </ul>
          </li>
          <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle js-activated">222222<b class="caret"></b></a>
            <div class="dropdown-menu"> 
              <div class="content">
                <div class="row">
                  <ul class="col-sm-3">
                    <li>
                      <p><strong>22222</strong></p>
                    </li>
          <li><a href="elements.html">22222</a></li>
          <li><a href="icons.html">2222</a></li>
                    <li><a href="">22222</a></li>
                  </ul>				
          <ul class="col-sm-3">
                    <li>
                      <p><strong>2.22222222</strong></p>
                    </li>
          <li><a href=""><i class="fa fa-square-o"></i> 2.22222</a></li>
          <li><a href=""><i class="fa fa-arrows-h"></i> 2.22222</a></li>
                    <li><a href=""><i class="fa fa-picture-o"></i> 2.22222</a></li>
                  </ul>					  
          <ul class="col-sm-6">
                    <li>
                      <p><strong>333333</strong></p>
 	  			      <ul class="lis">
              <li class="row">
                <ul class="col-sm-12">
              <li>
              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce posuere justo posuere, commodo nibh sit amet, malesuada nisi. Nam vitae mauris vel ante laoreet placerat. Praesent pellentesque consectetur lobortis. Pellentesque lacinia nibh leo, sed pharetra tortor sagittis id. Cras a scelerisque eros. Nunc ornare diam turpis, id vulputate massa sagittis sed.
              </li>
                          </ul>
              </li>
            </ul>
              </li>	
          </ul>		
                </div>
              </div>
            </div>
          </li>
          <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle js-activated">44444<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="">44444</a></li>
              <li><a href="">4444444</a></li>
            </ul>
          </li>
          <li> <a href="">55555</a></li>
          <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle js-activated">555555<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="">555551</a></li>
              <li><a href="">555552</a></li>
            </ul>
          </li>
        </ul>

as you can see 1 4 5 everything is understandable and easily embedded in the menu component (vertical multilevel)
but 22222 has a completely different nesting how to build such a menu?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Beloborodov, 2015-10-25
@kowap

The word "Bitrix" turns me on

A
alveryu, 2015-10-28
@alvery

It doesn't matter what level of nesting your menu is, it's important to understand how the bead component works.
CMenu::Init() will initialize the array based on your .<menu type>.menu.php
Next you need to rebuild the array into a tree structure, also check the max. nesting level in $arParams

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question