Структура сайта на основе магазина

#
Структура сайта на основе магазина
Задача меню для магазине на основе структуры нужно получить активность группы товаров первой уровня.

    <?php
   $structure = new Structure();
   $xsl = 'ГруппыТоваров1';
   $menu_id = false;

    // Необязательные параметры
   $param = array();
   $param['parent_id'] = 42;
   $param['show_shop_groups'] = true;
   $param['show_shop_items'] = true;
    // Внешние параметры для передачи в XML

   $external_propertys = array();
   $structure->ShowStructure($menu_id, $xsl, $param, $external_propertys);
   ?>



<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="utf-8" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>
   
   <xsl:template match="/document">
      <div id="sidebar">
         <ul class="choise-list">
            <!-- Выбираем узлы структуры -->
            <xsl:apply-templates select="structure[show=1]"/>
         </ul>
      </div>
   </xsl:template>
   
   <xsl:template match="structure">
      <li>
         <!-- Запишем в константу ID структуры, данные для которой будут выводиться пользователю -->
         <xsl:variable name="current_structure_id" select="/document/structure/current_structure_id"/>
         <xsl:choose>
            <!-- Выделяем текущую страницу жирным (если это текущая страница, либо у нее есть ребенок с ID, равным текущей) -->
            <xsl:when test="current_structure_id=@id or count(.//structure[@id=$current_structure_id])=1"><xsl:attribute name="class">
                  active
            </xsl:attribute></xsl:when>
            <!-- Иначе обычный вывод с пустым стилем -->
            <xsl:otherwise><xsl:attribute name="class">
                  no_active
            </xsl:attribute></xsl:otherwise>
         </xsl:choose>


         <div class="holder">
         
         <!--<span><xsl:value-of disable-output-escaping="yes" select="current_structure_id"/></span>-->
         <!-- Показывать ссылку, или нет -->
         <xsl:if test="show_link = 1">
            
            <!-- Определяем адрес ссылки -->
            <xsl:variable name="link">
               <xsl:choose>
                  <!-- Если внешняя ссылка -->
                  <xsl:when test="is_external_link=1">
                     <xsl:value-of disable-output-escaping="yes" select="external_link"/>
                  </xsl:when>
                  <!-- Иначе если внутренняя ссылка -->
                  <xsl:otherwise>
                     <xsl:value-of disable-output-escaping="yes" select="link"/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:variable>
            
            <!-- Определяем стиль вывода ссылки -->
            <xsl:variable name="link_style">
               <xsl:choose>
                  <!-- Выделяем текущую страницу жирным (если это текущая страница, либо у нее есть ребенок с ID, равным текущей) -->
                  <xsl:when test="current_structure_id=@id or count(.//structure[@id=$current_structure_id])=1">font-weight: bold</xsl:when>
                  <!-- Иначе обычный вывод с пустым стилем -->
                  <xsl:otherwise></xsl:otherwise>
               </xsl:choose>
            </xsl:variable>
            <div class="visual">
               <a href="{$link_style}"><img src="{small_image}" alt="{name}"  /></a>
            </div>

            <div class="text">
               <a href="{$link}">
                  <span style="{$link_style}">
                     <xsl:value-of disable-output-escaping="yes" select="name"/>
                  </span>
            </a>
            </div>
         </xsl:if>
         
         <!-- Если не показывать ссылку - выводим просто имя ссылки -->
         <xsl:if test="show_link=0">
            <!-- <img border="0" src="/images/menu_point.gif" class="menu_point" width="4" height="7" /> -->
            <xsl:value-of disable-output-escaping="yes" select="name"/>
         </xsl:if>
         </div>
         
         <!-- ЕСЛИ ДОШЛИ ДО СЕРЕДИНЫ СПИСКА -->
         
         <!-- Если не надо разравать колонку на вторых уровнях, то указать: -->
         <!-- <xsl:if test="position() = round(count(/document/structure) div 2)"> -->
            <!--
            <xsl:if test="level = 0 and position() = round(count(/document//structure) div 2)">
               <xsl:text disable-output-escaping="yes">
                  &lt;/td&gt;
                  &lt;td valign="top" style="padding-left: 20px"&gt;
               </xsl:text>
            </xsl:if>
            -->
            
            <!-- Выбираем подузлы структуры -->
            <xsl:if test="count(structure[show=1]) &gt; 0">
               <ul class="drop-choise" >
                  <!-- Выбираем узлы структуры -->
                  <xsl:apply-templates select="structure[show=1]" mode="group2"/>
               </ul>
            </xsl:if>
         </li>
      </xsl:template>
   <xsl:template match="structure" mode="group2">
      <li class="has-drop">
         <!-- Запишем в константу ID структуры, данные для которой будут выводиться пользователю -->
         <xsl:variable name="current_structure_id" select="/document/structure/current_structure_id"/>
         
         <!--<span><xsl:value-of disable-output-escaping="yes" select="current_structure_id"/></span>-->
         <!-- Показывать ссылку, или нет -->
         <xsl:if test="show_link = 1">
            
            <!-- Определяем адрес ссылки -->
            <xsl:variable name="link">
               <xsl:choose>
                  <!-- Если внешняя ссылка -->
                  <xsl:when test="is_external_link=1">
                     <xsl:value-of disable-output-escaping="yes" select="external_link"/>
                  </xsl:when>
                  <!-- Иначе если внутренняя ссылка -->
                  <xsl:otherwise>
                     <xsl:value-of disable-output-escaping="yes" select="link"/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:variable>
            
            <!-- Определяем стиль вывода ссылки -->
            <xsl:variable name="link_style">
               <xsl:choose>
                  <!-- Выделяем текущую страницу жирным (если это текущая страница, либо у нее есть ребенок с ID, равным текущей) -->
                  <xsl:when test="current_structure_id=@id or count(.//structure[@id=$current_structure_id])=1">font-weight: bold</xsl:when>
                  <!-- Иначе обычный вывод с пустым стилем -->
                  <xsl:otherwise></xsl:otherwise>
               </xsl:choose>
            </xsl:variable>

               <a href="{$link}">
               <span class="t"><span class="angle">&#160;</span></span>

                  <span class="c">
                     <span class="frame"><span class="link"><span style="{$link_style}">
                     <xsl:value-of disable-output-escaping="yes" select="name"/>
                  </span></span></span></span>
               <span class="b">&#160;</span>
               </a>
         </xsl:if>
         
            <!-- Выбираем подузлы структуры -->
            <xsl:if test="count(structure[show=1]) &gt; 0">
            <div class="drop-inner">
               <div class="drop-t">&#160;</div>
                  <div class="drop-c">
                     <div class="frame">
                        <ul>
                           <!-- Выбираем узлы структуры -->
                           <xsl:apply-templates select="structure[show=1]" mode="group3"/>
                        </ul>
                     </div>
                  </div>
               <div class="drop-b"><span class="angle">&#160;</span></div>
            </div>
            </xsl:if>
         </li>
      </xsl:template>
   <xsl:template match="structure" mode="group3">
      <li>
         <!-- Запишем в константу ID структуры, данные для которой будут выводиться пользователю -->
         <xsl:variable name="current_structure_id" select="/document/structure/current_structure_id"/>
         
         <!--<span><xsl:value-of disable-output-escaping="yes" select="current_structure_id"/></span>-->
         <!-- Показывать ссылку, или нет -->
         <xsl:if test="show_link = 1">
            
            <!-- Определяем адрес ссылки -->
            <xsl:variable name="link">
               <xsl:choose>
                  <!-- Если внешняя ссылка -->
                  <xsl:when test="is_external_link=1">
                     <xsl:value-of disable-output-escaping="yes" select="external_link"/>
                  </xsl:when>
                  <!-- Иначе если внутренняя ссылка -->
                  <xsl:otherwise>
                     <xsl:value-of disable-output-escaping="yes" select="link"/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:variable>
            
            <!-- Определяем стиль вывода ссылки -->
            <xsl:variable name="link_style">
               <xsl:choose>
                  <!-- Выделяем текущую страницу жирным (если это текущая страница, либо у нее есть ребенок с ID, равным текущей) -->
                  <xsl:when test="current_structure_id=@id or count(.//structure[@id=$current_structure_id])=1">font-weight: bold</xsl:when>
                  <!-- Иначе обычный вывод с пустым стилем -->
                  <xsl:otherwise></xsl:otherwise>
               </xsl:choose>
            </xsl:variable>

               <a href="{$link}">
                  <span style="{$link_style}">
                     <xsl:value-of disable-output-escaping="yes" select="name"/>
                  </span>
               </a>
         </xsl:if>
         </li>
      </xsl:template>
   </xsl:stylesheet>


<?xml version="1.0" encoding="UTF-8"?>
<document>
   <site site_id="1">
      <site_name>Солтек НТК</site_name>
      <site_coding>UTF-8</site_coding>
      <site_locale>C</site_locale>
      <site_timezone></site_timezone>
      <site_chmod>0777</site_chmod>
      <site_files_chmod>0777</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="3" alias_current="1">
         <alias_name>site.ru</alias_name>
      </alias>
   </site>
   <некий_внешний_параметр>42</некий_внешний_параметр>
   <structure id="95" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Новинки</name>
      <show>0</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>42</id_parent>
      <structure_title></structure_title>
      <structure_description></structure_description>
      <structure_keywords></structure_keywords>
      <structure_order>0</structure_order>
      <structure_path_name>new</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>/shop/new/</link>
      <structure_change_frequency>0</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <propertys>
      </propertys>
   </structure>
   <structure id="group_594" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Ультразвуковая очистка</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/shop/ultrasonic_cleaners/</link>
      <structure_change_frequency>2</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <image width="130" height="91">/upload/shop_1/5/9/4/group_594/shop_group_image594.png</image>
      <small_image width="69" height="61">/upload/shop_1/5/9/4/group_594/small_shop_group_image594.png</small_image>
      <structure id="group_604" menu_id="1">
         <current_structure_id>42</current_structure_id>
         <name>Ультразвуковые ванны Град</name>
         <show>1</show>
         <show_link>1</show_link>
         <level>1</level>
         <id_parent>594</id_parent>
         <is_external_link>0</is_external_link>
         <external_link></external_link>
         <link>/shop/ultrasonic_cleaners/grad/</link>
         <structure_change_frequency>2</structure_change_frequency>
         <structure_priority>0.5</structure_priority>
      </structure>
      <structure id="group_605" menu_id="1">
         <current_structure_id>42</current_structure_id>
         <name>Ультразвуковые ванны ELMA</name>
         <show>1</show>
         <show_link>1</show_link>
         <level>1</level>
         <id_parent>594</id_parent>
         <is_external_link>0</is_external_link>
         <external_link></external_link>
         <link>/shop/ultrasonic_cleaners/elma/</link>
         <structure_change_frequency>2</structure_change_frequency>
         <structure_priority>0.5</structure_priority>
         <structure id="item_168" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Elamsonic S</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_605</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/elma/ElamsonicS%20/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="400" height="107">/upload/shop_1/1/6/8/item_168/shop_items_catalog_image168.jpg</image>
            <small_image width="150" height="40">/upload/shop_1/1/6/8/item_168/small_shop_items_catalog_image168.jpg</small_image>
         </structure>
         <structure id="item_186" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Elamsonic P</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_605</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/elma/elamsonicP/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="200" height="182">/upload/shop_1/1/8/6/item_186/shop_items_catalog_image186.jpg</image>
            <small_image width="150" height="136">/upload/shop_1/1/8/6/item_186/small_shop_items_catalog_image186.jpg</small_image>
         </structure>
         <structure id="item_176" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Elmasonic X-tra</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_605</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/elma/ElmasonicXtra/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="373" height="293">/upload/shop_1/1/7/6/item_176/shop_items_catalog_image176.jpg</image>
            <small_image width="150" height="141">/upload/shop_1/1/7/6/item_176/small_shop_items_catalog_image176.jpg</small_image>
         </structure>
         <structure id="item_177" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Elmasonic XL</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_605</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/elma/ElmasonicXL/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="261" height="260">/upload/shop_1/1/7/7/item_177/shop_items_catalog_image177.jpg</image>
            <small_image width="180" height="179">/upload/shop_1/1/7/7/item_177/small_shop_items_catalog_image177.jpg</small_image>
         </structure>
         <structure id="item_178" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Elmasonic X-tra LSM</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_605</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/elma/ElmasonicLSM/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="318" height="372">/upload/shop_1/1/7/8/item_178/shop_items_catalog_image178.jpg</image>
            <small_image width="150" height="175">/upload/shop_1/1/7/8/item_178/small_shop_items_catalog_image178.jpg</small_image>
         </structure>
         <structure id="item_179" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Elmasonic X-tra basic</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_605</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/elma/ElmasonicBasic/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="215" height="325">/upload/shop_1/1/7/9/item_179/shop_items_catalog_image179.jpg</image>
            <small_image width="100" height="151">/upload/shop_1/1/7/9/item_179/small_shop_items_catalog_image179.jpg</small_image>
         </structure>
         <structure id="item_180" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Модульные системы отмывки Elmasonic X-tra line</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_605</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/elma/XtraLine/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="500" height="418">/upload/shop_1/1/8/0/item_180/shop_items_catalog_image180.jpg</image>
            <small_image width="200" height="145">/upload/shop_1/1/8/0/item_180/small_shop_items_catalog_image180.jpg</small_image>
         </structure>
      </structure>
      <structure id="group_606" menu_id="1">
         <current_structure_id>42</current_structure_id>
         <name>Погружные ультразвуковые излучатели</name>
         <show>1</show>
         <show_link>1</show_link>
         <level>1</level>
         <id_parent>594</id_parent>
         <is_external_link>0</is_external_link>
         <external_link></external_link>
         <link>/shop/ultrasonic_cleaners/emitters/</link>
         <structure_change_frequency>2</structure_change_frequency>
         <structure_priority>0.5</structure_priority>
      </structure>
      <structure id="group_607" menu_id="1">
         <current_structure_id>42</current_structure_id>
         <name>Дополнительное оборудование</name>
         <show>1</show>
         <show_link>1</show_link>
         <level>1</level>
         <id_parent>594</id_parent>
         <is_external_link>0</is_external_link>
         <external_link></external_link>
         <link>/shop/ultrasonic_cleaners/optional/</link>
         <structure_change_frequency>2</structure_change_frequency>
         <structure_priority>0.5</structure_priority>
         <structure id="item_181" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Система водоподготовки Elmapur 85</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_607</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/optional/Elmapur85/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="240" height="252">/upload/shop_1/1/8/1/item_181/shop_items_catalog_image181.jpg</image>
            <small_image width="150" height="157">/upload/shop_1/1/8/1/item_181/small_shop_items_catalog_image181.jpg</small_image>
         </structure>
         <structure id="item_182" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Маслоотделители Elma</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_607</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/optional/elma/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="222" height="245">/upload/shop_1/1/8/2/item_182/shop_items_catalog_image182.jpg</image>
            <small_image width="150" height="165">/upload/shop_1/1/8/2/item_182/small_shop_items_catalog_image182.jpg</small_image>
         </structure>
         <structure id="item_183" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Маслоотделитель Град</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_607</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/optional/grad/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="400" height="313">/upload/shop_1/1/8/3/item_183/shop_items_catalog_image183.jpg</image>
            <small_image width="180" height="140">/upload/shop_1/1/8/3/item_183/small_shop_items_catalog_image183.jpg</small_image>
         </structure>
         <structure id="item_187" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Станция ополаскивания</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_607</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/optional/st/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="291" height="346">/upload/shop_1/1/8/7/item_187/shop_items_catalog_image187.jpg</image>
            <small_image width="160" height="190">/upload/shop_1/1/8/7/item_187/small_shop_items_catalog_image187.jpg</small_image>
         </structure>
      </structure>
      <structure id="group_608" menu_id="1">
         <current_structure_id>42</current_structure_id>
         <name>Несерийное ультразвуковое оборудование</name>
         <show>1</show>
         <show_link>1</show_link>
         <level>1</level>
         <id_parent>594</id_parent>
         <is_external_link>0</is_external_link>
         <external_link></external_link>
         <link>/shop/ultrasonic_cleaners/ultro/</link>
         <structure_change_frequency>2</structure_change_frequency>
         <structure_priority>0.5</structure_priority>
         <structure id="item_184" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Ультразвуковая ванна «Град 189-4х660»</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_608</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/ultro/grad189/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="343" height="205">/upload/shop_1/1/8/4/item_184/shop_items_catalog_image184.jpg</image>
            <small_image width="200" height="119">/upload/shop_1/1/8/4/item_184/small_shop_items_catalog_image184.jpg</small_image>
         </structure>
         <structure id="item_185" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Ультразвуковая ванна «Град 2000-6х1320»</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_608</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/ultrasonic_cleaners/ultro/grad2000/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="313" height="222">/upload/shop_1/1/8/5/item_185/shop_items_catalog_image185.jpg</image>
            <small_image width="200" height="141">/upload/shop_1/1/8/5/item_185/small_shop_items_catalog_image185.jpg</small_image>
         </structure>
      </structure>
   </structure>
   <structure id="group_598" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Струйные моечные машины камерного типа</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/shop/jet_washers_cell-type/</link>
      <structure_change_frequency>2</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <image width="65" height="105">/upload/shop_1/5/9/8/group_598/shop_group_image598.png</image>
      <small_image width="48" height="58">/upload/shop_1/5/9/8/group_598/small_shop_group_image598.png</small_image>
   </structure>
   <structure id="group_595" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Струйные моечные машины конвейерного типа</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/shop/jet_washing_machine_conveyor_type/</link>
      <structure_change_frequency>2</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <image width="114" height="67">/upload/shop_1/5/9/5/group_595/shop_group_image595.png</image>
      <small_image width="63" height="50">/upload/shop_1/5/9/5/group_595/small_shop_group_image595.png</small_image>
   </structure>
   <structure id="group_596" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Очистка в модифицированных спиртах</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/shop/purification_of_modified_alcohol/</link>
      <structure_change_frequency>2</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <image width="98" height="66">/upload/shop_1/5/9/6/group_596/shop_group_image596.png</image>
      <small_image width="62" height="52">/upload/shop_1/5/9/6/group_596/small_shop_group_image596.png</small_image>
      <structure id="group_602" menu_id="1">
         <current_structure_id>42</current_structure_id>
         <name>Тест</name>
         <show>1</show>
         <show_link>1</show_link>
         <level>1</level>
         <id_parent>596</id_parent>
         <is_external_link>0</is_external_link>
         <external_link></external_link>
         <link>/shop/purification_of_modified_alcohol/group_602/</link>
         <structure_change_frequency>2</structure_change_frequency>
         <structure_priority>0.5</structure_priority>
         <structure id="item_170" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Манипулятор установки компонентов начального уровня LM 900 [Копия 10.08.2012 14:29:01]</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_602</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/purification_of_modified_alcohol/group_602/manipuljator-ustanovki-komponentov-nachalnogo-urovnja-lm-900-kopija-10082012-142901/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="232" height="158">/upload/shop_1/1/7/0/item_170/shop_items_catalog_image170.jpg</image>
            <small_image width="100" height="68">/upload/shop_1/1/7/0/item_170/small_shop_items_catalog_image170.jpg</small_image>
         </structure>
         <structure id="item_171" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Манипулятор установки компонентов начального уровня LM 900 [Копия 10.08.2012 14:29:07]</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_602</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/purification_of_modified_alcohol/group_602/manipuljator-ustanovki-komponentov-nachalnogo-urovnja-lm-900-kopija-10082012-142907/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="232" height="158">/upload/shop_1/1/7/1/item_171/shop_items_catalog_image171.jpg</image>
            <small_image width="100" height="68">/upload/shop_1/1/7/1/item_171/small_shop_items_catalog_image171.jpg</small_image>
         </structure>
         <structure id="item_172" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Манипулятор установки компонентов начального уровня LM 900 [Копия 10.08.2012 14:29:11]</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_602</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/purification_of_modified_alcohol/group_602/manipuljator-ustanovki-komponentov-nachalnogo-urovnja-lm-900-kopija-10082012-142911/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="232" height="158">/upload/shop_1/1/7/2/item_172/shop_items_catalog_image172.jpg</image>
            <small_image width="100" height="68">/upload/shop_1/1/7/2/item_172/small_shop_items_catalog_image172.jpg</small_image>
         </structure>
         <structure id="item_166" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Манипулятор установки компонентов начального уровня LM 900 [Копия 10.08.2012 14:28:48]</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_602</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/purification_of_modified_alcohol/group_602/manipuljator-ustanovki-komponentov-nachalnogo-urovnja-lm-900-kopija-10082012-142848/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="232" height="158">/upload/shop_1/1/6/6/item_166/shop_items_catalog_image166.jpg</image>
            <small_image width="100" height="68">/upload/shop_1/1/6/6/item_166/small_shop_items_catalog_image166.jpg</small_image>
         </structure>
         <structure id="item_167" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Манипулятор установки компонентов начального уровня LM 900 [Копия 10.08.2012 14:28:48] [Копия 10.08.2012 14:28:49]</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_602</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/purification_of_modified_alcohol/group_602/manipuljator-ustanovki-komponentov-nachalnogo-urovnja-lm-900-kopija-10082012-142848-kopija-10082012-142849/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="232" height="158">/upload/shop_1/1/6/7/item_167/shop_items_catalog_image167.jpg</image>
            <small_image width="100" height="68">/upload/shop_1/1/6/7/item_167/small_shop_items_catalog_image167.jpg</small_image>
         </structure>
         <structure id="item_169" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Манипулятор установки компонентов начального уровня LM 900 [Копия 10.08.2012 14:28:48] [Копия 10.08.2012 14:28:53]</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_602</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/purification_of_modified_alcohol/group_602/manipuljator-ustanovki-komponentov-nachalnogo-urovnja-lm-900-kopija-10082012-142848-kopija-10082012-142853/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="232" height="158">/upload/shop_1/1/6/9/item_169/shop_items_catalog_image169.jpg</image>
            <small_image width="100" height="68">/upload/shop_1/1/6/9/item_169/small_shop_items_catalog_image169.jpg</small_image>
         </structure>
         <structure id="item_164" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Манипулятор установки компонентов начального уровня LM 900</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_602</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/purification_of_modified_alcohol/group_602/item_164/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="232" height="158">/upload/shop_1/1/6/4/item_164/shop_items_catalog_image164.jpg</image>
            <small_image width="100" height="68">/upload/shop_1/1/6/4/item_164/small_shop_items_catalog_image164.jpg</small_image>
         </structure>
         <structure id="item_165" menu_id="1">
            <current_structure_id>42</current_structure_id>
            <name>Манипулятор установки компонентов начального уровня LM 900 [Копия 10.08.2012 14:28:45]</name>
            <seo_title></seo_title>
            <seo_description></seo_description>
            <seo_keywords></seo_keywords>
            <show>1</show>
            <show_link>1</show_link>
            <level>2</level>
            <id_parent>group_602</id_parent>
            <is_external_link>0</is_external_link>
            <external_link></external_link>
            <link>/shop/purification_of_modified_alcohol/group_602/manipuljator-ustanovki-komponentov-nachalnogo-urovnja-lm-900-kopija-10082012-142845/</link>
            <structure_change_frequency>2</structure_change_frequency>
            <structure_priority>0.5</structure_priority>
            <image width="232" height="158">/upload/shop_1/1/6/5/item_165/shop_items_catalog_image165.jpg</image>
            <small_image width="100" height="68">/upload/shop_1/1/6/5/item_165/small_shop_items_catalog_image165.jpg</small_image>
         </structure>
      </structure>
   </structure>
   <structure id="group_597" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Моющие средства</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/shop/detergents/</link>
      <structure_change_frequency>2</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <image width="112" height="87">/upload/shop_1/5/9/7/group_597/shop_group_image597.png</image>
      <small_image width="64" height="59">/upload/shop_1/5/9/7/group_597/small_shop_group_image597.png</small_image>
   </structure>
   <structure id="group_599" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Очистка в гидрофтор-эфирах</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/shop/cleaning_in_gidroftor-esters/</link>
      <structure_change_frequency>2</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <image width="78" height="93">/upload/shop_1/5/9/9/group_599/shop_group_image599.png</image>
      <small_image width="51" height="57">/upload/shop_1/5/9/9/group_599/small_shop_group_image599.png</small_image>
   </structure>
   <structure id="group_600" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Очистка листового металла</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/shop/cleaning_sheet_metal/</link>
      <structure_change_frequency>2</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <image width="98" height="63">/upload/shop_1/6/0/0/group_600/shop_group_image600.png</image>
      <small_image width="66" height="53">/upload/shop_1/6/0/0/group_600/small_shop_group_image600.png</small_image>
   </structure>
   <structure id="group_601" menu_id="1">
      <current_structure_id>42</current_structure_id>
      <name>Вспомогательное оборудование</name>
      <show>1</show>
      <show_link>1</show_link>
      <level>0</level>
      <id_parent>0</id_parent>
      <is_external_link>0</is_external_link>
      <external_link></external_link>
      <link>/shop/auxiliary_equipment/</link>
      <structure_change_frequency>2</structure_change_frequency>
      <structure_priority>0.5</structure_priority>
      <image width="133" height="78">/upload/shop_1/6/0/1/group_601/shop_group_image601.png</image>
      <small_image width="85" height="57">/upload/shop_1/6/0/1/group_601/small_shop_group_image601.png</small_image>
   </structure>
</document>


Нужно в выделенном блоке XSL получить активность группы и если мы находимся в подгрупах или в товаре этой группы тоже быть активным
Skype:ferdinant1988 ICQ:311960596 E-mail: ferdinant@i.ua
#
Re: Структура сайта на основе магазина
помогите!!!
Skype:ferdinant1988 ICQ:311960596 E-mail: ferdinant@i.ua
Модератор
#
Re: Структура сайта на основе магазина
Вы используете показ структуры. Каким образом передаете информацию о текущей группе? Ведь все подузлы магазина, генерируемые таким методом, связаны с одним-единственным идентификатором узла структуры.
Вы только что начали читать предложение, чтение которого вы уже заканчиваете.
Авторизация