Меню из структуры и ИС

#
Меню из структуры и ИС
Здравствуйте! Подскажите как реализовать такое меню: Пункт 1   Пункт 2   Пункт 3 (сто все ссылки на структуру). Из Пункт2 будет падающее меню и в него нужно добавить группы какой то определенной ИС. Не пойму как передать в один XML то что мне нужно, чтоб потом в XSL это реализовать. Или может какой то способ еще есть? Спасибо заранее!!!
#
Re: Меню из структуры и ИС

<?php
      $Structure = & singleton('Structure');
      $param = array();
      $param['show_groups'] = true;
      $param['show_items'] = false;
      $Structure->ShowStructure(6,'ГлавноеМеню',$param);
     ?>
http://superweb.pro/ — сайты на HostCMS под ключ
#
Re: Меню из структуры и ИС
Не работает. Нет же ссылки на ИС.
#
Re: Меню из структуры и ИС
Эээ... работает в том случае, если узел структуры привязан к ИС — выведутся группы этой ИС. А вам по-другому надо?
http://superweb.pro/ — сайты на HostCMS под ключ
#
Re: Меню из структуры и ИС
Привязан, группы выводятся но после клика по пункту меню, группы ИС выводятся на новой странице. А мне нужно чтобы при наведении на пункт меню раскрывалось падающее меню и там уже были эти группы. Я не могу сделать так как их нет в XML.

<?xml version="1.0" encoding="UTF-8"?>
<document>
   <site site_id="2">
      <site_name>Architecture 21.11.2011 10:47:36</site_name>
      <site_coding>UTF-8</site_coding>
      <site_locale>ru_RU.utf8</site_locale>
      <site_timezone></site_timezone>
      <site_chmod>0755</site_chmod>
      <site_files_chmod>0644</site_files_chmod>
      <site_date_format>%d.%m.%Y</site_date_format>
      <site_date_time_format>%d.%m.%Y %H:%M:%S</site_date_time_format>
      <site_html_cache_clear_probability>10000</site_html_cache_clear_probability>
      <alias alias_id="4" alias_current="1">
         <alias_name>best-design.mikealex.info</alias_name>
      </alias>
   </site>
   <structure id="88" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>Главная</name>
      <show>0</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title>Architecture</structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>10</structure_order>
      <structure_path_name>/</structure_path_name>
      <structure_type>0</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0</structure_priority>
   </structure>
   <structure id="97" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>Студия</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>10</structure_order>
      <structure_path_name>studija</structure_path_name>
      <structure_type>0</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/studija/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
   </structure>
   <structure id="90" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>Обзор услуг</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>20</structure_order>
      <structure_path_name>services</structure_path_name>
      <structure_type>0</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/services/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0</structure_priority>
   </structure>
   <structure id="95" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>Наши проекты</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>40</structure_order>
      <structure_path_name>team</structure_path_name>
      <structure_type>2</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/team/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0</structure_priority>
   </structure>
   <structure id="92" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>Контакты</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>50</structure_order>
      <structure_path_name>contacts</structure_path_name>
      <structure_type>0</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/contacts/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0</structure_priority>
   </structure>
   <structure id="93" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>Карта сайта</name>
      <show>0</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>60</structure_order>
      <structure_path_name>map</structure_path_name>
      <structure_type>2</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/map/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0</structure_priority>
   </structure>
   <structure id="96" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>наши клиенты</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>60</structure_order>
      <structure_path_name>klienty</structure_path_name>
      <structure_type>0</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/klienty/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
   </structure>
   <structure id="94" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>Статьи и публикации</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>70</structure_order>
      <structure_path_name>articles</structure_path_name>
      <structure_type>2</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/articles/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0</structure_priority>
   </structure>
   <structure id="91" menu_id="3">
      <current_structure_id>88</current_structure_id>
      <name>Новости</name>
      <show>0</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>80</structure_order>
      <structure_path_name>news</structure_path_name>
      <structure_type>2</structure_type>
      <structure_access>0</structure_access>
      <structure_access_protocol>0</structure_access_protocol>
      <structure_allow_indexation>1</structure_allow_indexation>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/news/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0</structure_priority>
   </structure>
</document>
#
Re: Меню из структуры и ИС
Тот код, который я вам показала, как раз добавляет группы в XML структуры. Это код от карты сайта, он 100% работает.
Вот смотрите пример — наведитесь в меню на галерею, и увидите, что выводятся группы, и не один уровень, а неограниченно — за счет рекурсии в XSL.
http://superweb.pro/ — сайты на HostCMS под ключ
#
Re: Меню из структуры и ИС
Не получается.... А у вас если посмотреть XML там есть уже группы которые в меню ГАЛЕРЕЯ?
#
Re: Меню из структуры и ИС
Да, есть, причем они выводятся именно как узлы структуры, только вместо числового идентификатора у них group_id:
<structure id="group_173" menu_id="6">
                  <current_structure_id>222</current_structure_id>
                  <name>Помет А</name>
                  <show>1</show>
                  <show_link>1</show_link>
                  <level>3</level>
                  <id_parent>172</id_parent>
                  <is_external_link>0</is_external_link>
                  <external_link></external_link>
                  <link>/gallery/cats/kittens/british-kittens/british-kittens-kharmis-a/</link>
                  <structure_change_frequency>0</structure_change_frequency>
                  <structure_priority>0.5</structure_priority>
                  <image>/uploadkh/information_system_51/1/7/3/group_173/information_groups_173.jpg</image>
                  <small_image>/uploadkh/information_system_51/1/7/3/group_173/small_information_groups_173.jpg</small_image>
               </structure>


Скопируйте код из моего первого ответа точь-в-точь, и замените 6 на свой ID меню, а ГлавноеМеню — на свое имя шаблона.
http://superweb.pro/ — сайты на HostCMS под ключ
#
Re: Меню из структуры и ИС
Я это сделал сразу же, XML который я выложел именно после добовления
#
Re: Меню из структуры и ИС
Попробуйте добавить еще $param['level'] = -1;
http://superweb.pro/ — сайты на HostCMS под ключ
Авторизация