Выпадающее двухуровневое меню на основе структуры сайта

#
Выпадающее двухуровневое меню на основе структуры сайта
Добрый день!
На основе имеющегося в одной из тем кода пытаюсь сделать меню, построенное на структуре сайта. В итоге получаю выпадающий первый уровень, а второй выпадать не желает - при клике меню сворачивается (выделил жирным шрифтом соответствующую часть кода). Если поможете понять в чём я ошибаюсь, буду очень благодарен.



<!-- Запишем в константу ID структуры -->
   <xsl:variable name="current_structure_id" select="/site/current_structure_id"/>


   <!-- перебор элементов первого (ROOT) уровня начинается отсюда, с заключение каждого в тег li -->
   <xsl:template match="structure">
      <li>
         <xsl:if test="$current_structure_id = @id or count(.//structure[@id=$current_structure_id]) = 1">
            <xsl:attribute name="class">active</xsl:attribute>
         </xsl:if>

         <xsl:if test="position() = last()">
            <xsl:attribute name="style">background-image: none</xsl:attribute>
         </xsl:if>

         <xsl:variable name="link">
            <xsl:choose>
               <!-- Если внешняя ссылка -->
               <xsl:when test="url != ''">
                  <xsl:value-of disable-output-escaping="yes" select="url"/>
               </xsl:when>
               <!-- Иначе если внутренняя ссылка -->
               <xsl:otherwise>
                  <xsl:value-of disable-output-escaping="yes" select="link"/>
               </xsl:otherwise>
            </xsl:choose>
         </xsl:variable>

         <xsl:choose>
            <xsl:when  test="count(informationsystem_group) &gt; 0">
               <!-- Если текущий элемент является инфосистемой и у нее внутри есть хотя-бы одна группа -->
               <a href="{$link}" class="dropdown-toggle" data-toggle="dropdown" title="{name}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="structure"><xsl:value-of disable-output-escaping="yes" select="name"/><b class="caret"></b></a>
               <ul class="dropdown-menu">
                  <xsl:apply-templates select="informationsystem_group[show=1]" mode="InfoSystem" />
               </ul>
            </xsl:when>

            <!-- Если текущий элемент является элементом структуры сайта с потомками, не инфосистемой -->
            <xsl:when  test="count(structure) &gt; 0">
               <a href="{$link}" class="dropdown-toggle" data-toggle="dropdown" title="{name}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="structure"><xsl:value-of disable-output-escaping="yes" select="name"/><b class="caret"></b></a>
               <ul class="dropdown-menu">
                  <xsl:apply-templates select="structure[show=1]" />
               </ul>
            </xsl:when>
            <!-- Если текущий элемент не имеет потомков  -->
            <xsl:otherwise>
               <a href="{$link}" title="{name}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="structure"><xsl:value-of disable-output-escaping="yes" select="name"/></a>
            </xsl:otherwise>
         </xsl:choose>
      </li>
   </xsl:template>

   <!-- Всех потомков элемента, являющегося структурой, отправляем на перебор сюда.  -->
   <xsl:template match="structure" >
      <li>
         <xsl:if test="$current_structure_id = @id or count(.//structure[@id=$current_structure_id]) = 1">
            <xsl:attribute name="class">active</xsl:attribute>
         </xsl:if>

         <xsl:if test="position() = last()">
            <xsl:attribute name="style">background-image: none</xsl:attribute>
         </xsl:if>

         <xsl:variable name="link">
            <xsl:choose>
               <!-- Если внешняя ссылка -->
               <xsl:when test="url != ''">
                  <xsl:value-of disable-output-escaping="yes" select="url"/>
               </xsl:when>
               <!-- Иначе если внутренняя ссылка -->
               <xsl:otherwise>
                  <xsl:value-of disable-output-escaping="yes" select="link"/>
               </xsl:otherwise>
            </xsl:choose>
         </xsl:variable>

     
               <xsl:choose>
                  <xsl:when  test="count(structure) &gt; 0">
               <a href="{$link}" class="dropdown-toggle" data-toggle="dropdown" title="{name}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="structure"><xsl:value-of disable-output-escaping="yes" select="name"/><b class="caret"></b></a>
               <ul class="dropdown-menu">
                  <xsl:apply-templates select="structure[show=1]" />
               </ul>
            </xsl:when>
                  <xsl:otherwise>
               <a href="{$link}" title="{name}" hostcms:id="{@id}" hostcms:field="name" hostcms:entity="structure"><xsl:value-of disable-output-escaping="yes" select="name"/></a>
            </xsl:otherwise>
               </xsl:choose>

</li>
            </xsl:template>
lbrstudio@mail.ru
Модератор
#
Re: Выпадающее двухуровневое меню на основе структуры сайта
Вам нужно свое меню вначале отладить на HTML, а потом уже динамически его строить на XSL, к HostCMS вопрос не относится в принципе.
#
Re: Выпадающее двухуровневое меню на основе структуры сайта
Меню отлажено и выводится как полагается. Последний уровень не раскрывается - вот проблема.

<ul class="nav navbar-nav">
      <li>
        <a href="/o-kompanii/" class="dropdown-toggle" data-toggle="dropdown" title="О компании">О компании<b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li>
            <a href="/o-kompanii/klienty-i-partnery/" title="Клиенты и партнеры">Клиенты и партнеры</a>
          </li>
          <li>
            <a href="/o-kompanii/otzyvy/" title="Отзывы">Отзывы</a>
          </li>
          <li>
            <a href="/o-kompanii/novosty/" title="Новости">Новости</a>
          </li>
          <li>
            <a href="/o-kompanii/baza-znany/" title="База знаний">База знаний</a>
          </li>
          <li>
            <a href="/o-kompanii/blog/" title="Блог">Блог</a>
          </li>
          <li style="background-image: none">
            <a href="/o-kompanii/kariera-v-luxline/" title="Карьера в Люкс Лайн">Карьера в Люкс Лайн</a>
          </li>
        </ul>
      </li>
      <li class="show">
        <a href="/uslugi/" class="dropdown-toggle" data-toggle="dropdown" title="Услуги" aria-expanded="true">Услуги<b class="caret"></b></a>
        <ul class="dropdown-menu show">
          <li>
            <a href="/uslugi/gruzoperevozki-iz-kitaya/" class="dropdown-toggle" data-toggle="dropdown" title="Грузоперевозки из Китая">Грузоперевозки из Китая<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li>
                <a href="/uslugi/gruzoperevozki-iz-kitaya/aviadostavka-iz-kitaya/" title="Авиадоставка из Китая">Авиадоставка из Китая</a>
              </li>
              <li>
                <a href="/uslugi/gruzoperevozki-iz-kitaya/avtoperevozki-iz-kitaya/" title="Автоперевозки из Китая">Автоперевозки из Китая</a>
              </li>
              <li>
                <a href="/uslugi/gruzoperevozki-iz-kitaya/zheleznodorozhnye-perevozki-iz-kitaya/" title="Железнодорожные перевозки из Китая">Железнодорожные перевозки из Китая</a>
              </li>
              <li>
                <a href="/uslugi/gruzoperevozki-iz-kitaya/kontejnernye-perevozki-iz-kitaya/" title="Контейнерные перевозки из Китая">Контейнерные перевозки из Китая</a>
              </li>
              <li>
                <a href="/uslugi/gruzoperevozki-iz-kitaya/morskie-perevozki-iz-kitaya-v-rossiyu/" title="Морские перевозки из Китая в Россию">Морские перевозки из Китая в Россию</a>
              </li>
              <li style="background-image: none">
                <a href="/uslugi/gruzoperevozki-iz-kitaya/sbornye-gruzy-iz-kitaya/" title="Сборные грузы из Китая">Сборные грузы из Китая</a>
              </li>
            </ul>
          </li>
          <li>
            <a href="/uslugi/gruzoperevozki-iz-evropy-v-rossiyu/" title="Грузоперевозки из Европы в Россию">Грузоперевозки из Европы в Россию</a>
          </li>
          <li>
            <a href="/uslugi/gruzoperevozki-iz-indii-v-rossiyu/" title="Грузоперевозки из Индии в Россию">Грузоперевозки из Индии в Россию</a>
          </li>
          <li>
            <a href="/uslugi/gruzoperevozki-iz-turczii-v-rossiyu/" title="Грузоперевозки из Турции в Россию">Грузоперевозки из Турции в Россию</a>
          </li>
          <li>
            <a href="/uslugi/tamojennoe-oformlenie/" title="Таможенное оформление">Таможенное оформление</a>
          </li>
          <li>
            <a href="/uslugi/mejdunarodnye-gruzoperevozki/" class="dropdown-toggle" data-toggle="dropdown" title="Международные грузоперевозки">Международные грузоперевозки<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li>
                <a href="/uslugi/mejdunarodnye-gruzoperevozki/mejdunarodnye-avtomobilnye-perevozki/" title="Международные автомобильные перевозки">Международные автомобильные перевозки</a>
              </li>
              <li>
                <a href="/uslugi/mejdunarodnye-gruzoperevozki/morskie-konteinernye-perevozki/" title="Морские контейнерные перевозки">Морские контейнерные перевозки</a>
              </li>
              <li>
                <a href="/uslugi/mejdunarodnye-gruzoperevozki/jeleznodorojnye-kontejnernye-perevozki/" title="Железнодороджные контейнерные перевозки">Железнодороджные контейнерные перевозки</a>
              </li>
              <li>
                <a href="/uslugi/mejdunarodnye-gruzoperevozki/mezhdunarodnye-perevozki-sbornyx-gruzov/" title="Международные перевозки сборных грузов">Международные перевозки сборных грузов</a>
              </li>
              <li style="background-image: none">
                <a href="/uslugi/mejdunarodnye-gruzoperevozki/multimodalnye-gruzoperevozki-v-rossiyu/" title="Мультимодальные грузоперевозки в Россию">Мультимодальные грузоперевозки в Россию</a>
              </li>
            </ul>
          </li>
          <li>
            <a href="/uslugi/perevody-v-kitai-i-evropu/" title="Переводы в Китай и Европу">Переводы в Китай и Европу</a>
          </li>
          <li>
            <a href="/uslugi/gruzoperevozki-iz-evropy-v-rossiyu/" title="Закупка санкционной продукции">Закупка санкционной продукции</a>
          </li>
          <li>
            <a href="/uslugi/uslugi-ved/" title="Услуги ВЭД">Услуги ВЭД</a>
          </li>
          <li>
            <a href="/uslugi/sertifikaciya-tovarov/" title="Сертификация товаров">Сертификация товаров</a>
          </li>
          <li>
            <a href="/uslugi/tamojenny-jurist/" title="Таможенный юрист">Таможенный юрист</a>
          </li>
          <li>
            <a href="/uslugi/dopolnitelnte-uslugi/" class="dropdown-toggle" data-toggle="dropdown" title="Дополнительные услуги">Дополнительные услуги<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li>
                <a href="/uslugi/dopolnitelnte-uslugi/hranenie-i-skladskie-uslufi/" title="Хранение и складские услуги">Хранение и складские услуги</a>
              </li>
              <li>
                <a href="/uslugi/dopolnitelnte-uslugi/strahovanie-gruza/" title="Страхование груза">Страхование груза</a>
              </li>
              <li>
                <a href="/uslugi/dopolnitelnte-uslugi/surveierskie-uslugi/" title="Сюрвейерские услуги">Сюрвейерские услуги</a>
              </li>
              <li style="background-image: none">
                <a href="/uslugi/dopolnitelnte-uslugi/sertifikatciya-i-oformlenie-dokumentov/" title="Сертификация и оформление  документов">Сертификация и оформление  документов</a>
              </li>
            </ul>
          </li>
          <li style="background-image: none">
            <a href="/uslugi/gruzoperevozki-iz-kitaya/sbornye-gruzy-iz-kitaya/" title="Гарантия сроков доставки">Гарантия сроков доставки</a>
          </li>
        </ul>
      </li>
      <li>
        <a href="/keysy/" title="Кейсы">Кейсы</a>
      </li>
      <li>
        <a href="/poleznoe/" class="dropdown-toggle" data-toggle="dropdown" title="Полезное">Полезное<b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li>
            <a href="/poleznoe/tamojni/" title="Таможни">Таможни</a>
          </li>
          <li>
            <a href="/poleznoe/geografiya-perevozok/" title="География перевозок">География перевозок</a>
          </li>
          <li style="background-image: none">
            <a href="/poleznoe/slovar-tamozhennyh-terminov/" title="Словарь таможенных терминов">Словарь таможенных терминов</a>
          </li>
        </ul>
      </li>
      <li style="background-image: none">
        <a href="/contacts/" title="Контакты">Контакты</a>
      </li>
    </ul>


Цитата:
к HostCMS вопрос не относится в принципе

Конечно, делаю сайт на HostCMS, а вопрос в принципе не относится к ней.
lbrstudio@mail.ru
Модератор
#
Re: Выпадающее двухуровневое меню на основе структуры сайта
O`Breea писал(а):
Меню отлажено и выводится как полагается. Последний уровень не раскрывается - вот проблема.

выходит оно все же не работает как требуется, поэтому нужно вначале правильно сформировать код своего меню, а потом уже переносить в XSL-шаблон.

O`Breea писал(а):
Конечно, делаю сайт на HostCMS, а вопрос в принципе не относится к ней.

Все верно, вопрос в работе меню в браузере, откуда оно взялось, из HostCMS или из статичного файла к предмету обсуждения не относится.
#
Re: Выпадающее двухуровневое меню на основе структуры сайта
O`Breea,
скорее всего проблема в js макета
по коду XSLT и скрину разобраться сложно,
посмотрите в XML - есть там дочерние узлы структуры для вывода, если нет - смотрите в вызов меню
->level() ?
Знания имеют свои пределы, и только глупость человеческая не знает границ...
#
Re: Выпадающее двухуровневое меню на основе структуры сайта
EZ-Web
Да, дочерние узлы в XML есть. Жирным выделил те, что должны открываться, но не открываются.
Привёл часть кода, т.к. весь достаточно длинный.
Сайт: https://cn76482.tw1.ru/  , меню под "бутербродом" слева.



<site id="2">
   <name>Демонстрационный сайт 12.08.2024 16:56:14</name>
   <active>1</active>
   <coding>UTF-8</coding>
   <sorting>0</sorting>
   <locale>ru_RU.utf8</locale>
   <timezone></timezone>
   <max_size_load_image>70</max_size_load_image>
   <max_size_load_image_big>300</max_size_load_image_big>
   <admin_email></admin_email>
   <sender_name></sender_name>
   <error_email></error_email>
   <lng>ru</lng>
   <send_attendance_report>1</send_attendance_report>
   <date_format>%d.%m.%Y</date_format>
   <date_time_format>%d.%m.%Y %H:%M:%S</date_time_format>
   <error_bot>0</error_bot>
   <protect>1</protect>
   <protect_frame>1</protect_frame>
   <protect_frame_exclusions></protect_frame_exclusions>
   <https>1</https>
   <favicon>site_2.ico</favicon>
   <csp></csp>
   <parent_id>0</parent_id>
   <current_structure_id>5</current_structure_id>
   <structure id="7">
      <structure_menu_id>4</structure_menu_id>
      <template_id>12</template_id>
      <site_id>2</site_id>
      <document_id>13</document_id>
      <lib_id>0</lib_id>
      <parent_id>0</parent_id>
      <shortcut_id>0</shortcut_id>
      <name>О компании</name>
      <seo_title></seo_title>
      <seo_description></seo_description>
      <seo_keywords></seo_keywords>
      <show>1</show>
      <sorting>0</sorting>
      <path>o-kompanii</path>
      <type>0</type>
      <siteuser_group_id>0</siteuser_group_id>
      <https>1</https>
      <active>1</active>
      <indexing>1</indexing>
      <changefreq>2</changefreq>
      <priority>0.5</priority>
      <link>/o-kompanii/</link>
      <dir>/upload/structure_2/0/0/7/structure_7/</dir>
      <structure id="57">
         <structure_menu_id>4</structure_menu_id>
         <template_id>16</template_id>
         <site_id>2</site_id>
         <document_id>23</document_id>
         <lib_id>0</lib_id>
         <parent_id>7</parent_id>
         <shortcut_id>0</shortcut_id>
         <name>Клиенты и партнеры</name>
         <seo_title></seo_title>
         <seo_description></seo_description>
         <seo_keywords></seo_keywords>
         <show>1</show>
         <sorting>0</sorting>
         <path>klienty-i-partnery</path>
         <type>0</type>
         <siteuser_group_id>0</siteuser_group_id>
         <https>1</https>
         <active>1</active>
         <indexing>1</indexing>
         <changefreq>2</changefreq>
         <priority>0.5</priority>
         <link>/o-kompanii/klienty-i-partnery/</link>
         <dir>/upload/structure_2/0/5/7/structure_57/</dir>
      </structure>
      <structure id="58">
         <structure_menu_id>4</structure_menu_id>
         <template_id>14</template_id>
         <site_id>2</site_id>
         <document_id>24</document_id>
         <lib_id>50</lib_id>
         <parent_id>7</parent_id>
         <shortcut_id>0</shortcut_id>
         <name>Отзывы</name>
         <seo_title></seo_title>
         <seo_description></seo_description>
         <seo_keywords></seo_keywords>
         <show>1</show>
         <sorting>1</sorting>
         <path>otzyvy</path>
         <type>2</type>
         <siteuser_group_id>0</siteuser_group_id>
         <https>1</https>
         <active>1</active>
         <indexing>1</indexing>
         <changefreq>2</changefreq>
         <priority>0.5</priority>
         <link>/o-kompanii/otzyvy/</link>
         <dir>/upload/structure_2/0/5/8/structure_58/</dir>
      </structure>
      <structure id="80">
         <structure_menu_id>4</structure_menu_id>
         <template_id>14</template_id>
         <site_id>2</site_id>
         <document_id>0</document_id>
         <lib_id>50</lib_id>
         <parent_id>7</parent_id>
         <shortcut_id>0</shortcut_id>
         <name>Новости</name>
         <seo_title></seo_title>
         <seo_description></seo_description>
         <seo_keywords></seo_keywords>
         <show>1</show>
         <sorting>2</sorting>
         <path>novosty</path>
         <type>2</type>
         <siteuser_group_id>0</siteuser_group_id>
         <https>1</https>
         <active>1</active>
         <indexing>1</indexing>
         <changefreq>2</changefreq>
         <priority>0.5</priority>
         <link>/o-kompanii/novosty/</link>
         <dir>/upload/structure_2/0/8/0/structure_80/</dir>
      </structure>
      <structure id="59">
         <structure_menu_id>4</structure_menu_id>
         <template_id>12</template_id>
         <site_id>2</site_id>
         <document_id>25</document_id>
         <lib_id>0</lib_id>
         <parent_id>7</parent_id>
         <shortcut_id>0</shortcut_id>
         <name>База знаний</name>
         <seo_title></seo_title>
         <seo_description></seo_description>
         <seo_keywords></seo_keywords>
         <show>1</show>
         <sorting>3</sorting>
         <path>baza-znany</path>
         <type>0</type>
         <siteuser_group_id>0</siteuser_group_id>
         <https>1</https>
         <active>1</active>
         <indexing>1</indexing>
         <changefreq>2</changefreq>
         <priority>0.5</priority>
         <link>/o-kompanii/baza-znany/</link>
         <dir>/upload/structure_2/0/5/9/structure_59/</dir>
      </structure>
      <structure id="60">
         <structure_menu_id>4</structure_menu_id>
         <template_id>14</template_id>
         <site_id>2</site_id>
         <document_id>27</document_id>
         <lib_id>50</lib_id>
         <parent_id>7</parent_id>
         <shortcut_id>0</shortcut_id>
         <name>Блог</name>
         <seo_title></seo_title>
         <seo_description></seo_description>
         <seo_keywords></seo_keywords>
         <show>1</show>
         <sorting>4</sorting>
         <path>blog</path>
         <type>2</type>
         <siteuser_group_id>0</siteuser_group_id>
         <https>1</https>
         <active>1</active>
         <indexing>1</indexing>
         <changefreq>2</changefreq>
         <priority>0.5</priority>
         <link>/o-kompanii/blog/</link>
         <dir>/upload/structure_2/0/6/0/structure_60/</dir>
      </structure>
      <structure id="61">
         <structure_menu_id>4</structure_menu_id>
         <template_id>14</template_id>
         <site_id>2</site_id>
         <document_id>28</document_id>
         <lib_id>0</lib_id>
         <parent_id>7</parent_id>
         <shortcut_id>0</shortcut_id>
         <name>Карьера в Люкс Лайн</name>
         <seo_title></seo_title>
         <seo_description></seo_description>
         <seo_keywords></seo_keywords>
         <show>1</show>
         <sorting>5</sorting>
         <path>kariera-v-luxline</path>
         <type>0</type>
         <siteuser_group_id>0</siteuser_group_id>
         <https>1</https>
         <active>1</active>
         <indexing>1</indexing>
         <changefreq>2</changefreq>
         <priority>0.5</priority>
         <link>/o-kompanii/kariera-v-luxline/</link>
         <dir>/upload/structure_2/0/6/1/structure_61/</dir>
      </structure>
   </structure>
   <structure id="55">
      <structure_menu_id>4</structure_menu_id>
      <template_id>7</template_id>
      <site_id>2</site_id>
      <document_id>19</document_id>
      <lib_id>0</lib_id>
      <parent_id>0</parent_id>
      <shortcut_id>0</shortcut_id>
      <name>Услуги</name>
      <seo_title></seo_title>
      <seo_description></seo_description>
      <seo_keywords></seo_keywords>
      <show>1</show>
      <sorting>1</sorting>
      <path>uslugi</path>
      <type>0</type>
      <siteuser_group_id>0</siteuser_group_id>
      <https>1</https>
      <active>1</active>
      <indexing>0</indexing>
      <changefreq>2</changefreq>
      <priority>0.5</priority>
      <link>/uslugi/</link>
      <dir>/upload/structure_2/0/5/5/structure_55/</dir>
      <structure id="81">
         <structure_menu_id>4</structure_menu_id>
         <template_id>7</template_id>
         <site_id>2</site_id>
         <document_id>48</document_id>
         <lib_id>0</lib_id>
         <parent_id>55</parent_id>
         <shortcut_id>0</shortcut_id>
         <name>Грузоперевозки из Китая</name>
         <seo_title></seo_title>
         <seo_description></seo_description>
         <seo_keywords></seo_keywords>
         <show>1</show>
         <sorting>0</sorting>
         <path>gruzoperevozki-iz-kitaya</path>
         <type>0</type>
         <siteuser_group_id>0</siteuser_group_id>
         <https>1</https>
         <active>1</active>
         <indexing>1</indexing>
         <changefreq>2</changefreq>
         <priority>0.5</priority>
         <link>/uslugi/gruzoperevozki-iz-kitaya/</link>
         <dir>/upload/structure_2/0/8/1/structure_81/</dir>
         <structure id="83">
            <structure_menu_id>4</structure_menu_id>
            <template_id>7</template_id>
            <site_id>2</site_id>
            <document_id>50</document_id>
            <lib_id>0</lib_id>
            <parent_id>81</parent_id>
            <shortcut_id>0</shortcut_id>
            <name>Авиадоставка из Китая</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <sorting>0</sorting>
            <path>aviadostavka-iz-kitaya</path>
            <type>0</type>
            <siteuser_group_id>0</siteuser_group_id>
            <https>1</https>
            <active>1</active>
            <indexing>1</indexing>
            <changefreq>2</changefreq>
            <priority>0.5</priority>
            <link>/uslugi/gruzoperevozki-iz-kitaya/aviadostavka-iz-kitaya/</link>
            <dir>/upload/structure_2/0/8/3/structure_83/</dir>
         </structure>
         <structure id="85">
            <structure_menu_id>4</structure_menu_id>
            <template_id>7</template_id>
            <site_id>2</site_id>
            <document_id>52</document_id>
            <lib_id>0</lib_id>
            <parent_id>81</parent_id>
            <shortcut_id>0</shortcut_id>
            <name>Автоперевозки из Китая</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <sorting>0</sorting>
            <path>avtoperevozki-iz-kitaya</path>
            <type>0</type>
            <siteuser_group_id>0</siteuser_group_id>
            <https>1</https>
            <active>1</active>
            <indexing>1</indexing>
            <changefreq>2</changefreq>
            <priority>0.5</priority>
            <link>/uslugi/gruzoperevozki-iz-kitaya/avtoperevozki-iz-kitaya/</link>
            <dir>/upload/structure_2/0/8/5/structure_85/</dir>
         </structure>
         <structure id="82">
            <structure_menu_id>4</structure_menu_id>
            <template_id>7</template_id>
            <site_id>2</site_id>
            <document_id>49</document_id>
            <lib_id>0</lib_id>
            <parent_id>81</parent_id>
            <shortcut_id>0</shortcut_id>
            <name>Железнодорожные перевозки из Китая</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <sorting>0</sorting>
            <path>zheleznodorozhnye-perevozki-iz-kitaya</path>
            <type>0</type>
            <siteuser_group_id>0</siteuser_group_id>
            <https>1</https>
            <active>1</active>
            <indexing>1</indexing>
            <changefreq>2</changefreq>
            <priority>0.5</priority>
            <link>/uslugi/gruzoperevozki-iz-kitaya/zheleznodorozhnye-perevozki-iz-kitaya/</link>
            <dir>/upload/structure_2/0/8/2/structure_82/</dir>
         </structure>
         <structure id="84">
            <structure_menu_id>4</structure_menu_id>
            <template_id>7</template_id>
            <site_id>2</site_id>
            <document_id>51</document_id>
            <lib_id>0</lib_id>
            <parent_id>81</parent_id>
            <shortcut_id>0</shortcut_id>
            <name>Контейнерные перевозки из Китая</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <sorting>0</sorting>
            <path>kontejnernye-perevozki-iz-kitaya</path>
            <type>0</type>
            <siteuser_group_id>0</siteuser_group_id>
            <https>1</https>
            <active>1</active>
            <indexing>1</indexing>
            <changefreq>2</changefreq>
            <priority>0.5</priority>
            <link>/uslugi/gruzoperevozki-iz-kitaya/kontejnernye-perevozki-iz-kitaya/</link>
            <dir>/upload/structure_2/0/8/4/structure_84/</dir>
         </structure>
         <structure id="86">
            <structure_menu_id>4</structure_menu_id>
            <template_id>7</template_id>
            <site_id>2</site_id>
            <document_id>53</document_id>
            <lib_id>0</lib_id>
            <parent_id>81</parent_id>
            <shortcut_id>0</shortcut_id>
            <name>Морские перевозки из Китая в Россию</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <sorting>5</sorting>
            <path>morskie-perevozki-iz-kitaya-v-rossiyu</path>
            <type>0</type>
            <siteuser_group_id>0</siteuser_group_id>
            <https>1</https>
            <active>1</active>
            <indexing>1</indexing>
            <changefreq>2</changefreq>
            <priority>0.5</priority>
            <link>/uslugi/gruzoperevozki-iz-kitaya/morskie-perevozki-iz-kitaya-v-rossiyu/</link>
            <dir>/upload/structure_2/0/8/6/structure_86/</dir>
         </structure>
         <structure id="67">
            <structure_menu_id>4</structure_menu_id>
            <template_id>7</template_id>
            <site_id>2</site_id>
            <document_id>34</document_id>
            <lib_id>0</lib_id>
            <parent_id>81</parent_id>
            <shortcut_id>0</shortcut_id>
            <name>Сборные грузы из Китая</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <sorting>5</sorting>
            <path>sbornye-gruzy-iz-kitaya</path>
            <type>0</type>
            <siteuser_group_id>0</siteuser_group_id>
            <https>1</https>
            <active>1</active>
            <indexing>1</indexing>
            <changefreq>2</changefreq>
            <priority>0.5</priority>
            <link>/uslugi/gruzoperevozki-iz-kitaya/sbornye-gruzy-iz-kitaya/</link>
            <dir>/upload/structure_2/0/6/7/structure_67/</dir>
         </structure>

      </structure>
      
...


</site>



lbrstudio@mail.ru
#
Re: Выпадающее двухуровневое меню на основе структуры сайта
явно проблема в js
Знания имеют свои пределы, и только глупость человеческая не знает границ...
Авторизация