Меню + InformationSystem

#
Меню + InformationSystem
Для сайта http://www.3d-spb.ru/

надо чтобы раскрывающим меню выводились заголовки информационной системы
например для данной страници http://www.3d-spb.ru/about/news/
# Новости
  - заголовок 1
  - заголовок 2
  - заголовок 3
# Партнеры
# Вакансии
# Support
# Галерея

нашёл на форуме пример подобного решения, но ни чего не вышло

<?
/* Выводим меню на основе структуры */
$param = array();
$param ['show_groups'] = true; # Показывать группы информационных систем в карте сайта
$param ['show_items'] = true;

$InformationSystem = new InformationSystem();
$InformationSystemId = $InformationSystem->GetInformationSystemByStructureId(CURRENT_STRUCTURE_ID);
$arr = array();
$arr = $InformationSystem->GetInformationFromPath($InformationSystemId);
$rez_item = false;
$rez_item = $InformationSystem->GetIdInformationItem($arr['item'],$arr['group'],$InformationSystemId);
$external_propertys = array();

if($arr['group'] != false && $arr['group'] != 0) {
        $external_propertys['ТекущаяГруппа'] = $arr['group'];
};
if($rez_item != false) {
        $external_propertys['ТекущийЭлемент'] = $rez_item;
};

$Structure->ShowStructure(1, 'ПростоеМеню', $param, $external_propertys);
?>

шаблон:

<?xml version="1.0" encoding="windows-1251"?>
<!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="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml" />

<xsl:template match="/document">
<ul>              
      <xsl:apply-templates select="structure[show=1]"/>
</ul>
  
</xsl:template>

<xsl:template match="structure">
  
   <!-- Запишем в константу ID структуры, данные для которой будут выводиться пользователю -->
   <xsl:variable name="current_structure_id"><xsl:choose>
      <xsl:when test="/document/ТекущийЭлемент/node()">item_<xsl:value-of select="/document/ТекущийЭлемент"/></xsl:when>
      <xsl:when test="/document/ТекущаяГруппа/node()">group_<xsl:value-of select="/document/ТекущаяГруппа"/></xsl:when>
      <xsl:otherwise><xsl:value-of select="/document/structure/current_structure_id"/></xsl:otherwise>
   </xsl:choose></xsl:variable>
  
      <!-- Показывать ссылку, или нет -->
      <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:if test="$current_structure_id=@id"><li><xsl:value-of disable-output-escaping="yes" select="name"/></li></xsl:if>
<xsl:if test="$current_structure_id!=@id"><li><a href="{$link}"><xsl:value-of disable-output-escaping="yes" select="name"/></a></li></xsl:if>

      </xsl:if>

      <!-- Если не показывать ссылку - выводим просто имя ссылки -->
      <xsl:if test="show_link=0">
         <li><xsl:value-of disable-output-escaping="yes" select="name"/></li>
      </xsl:if>

</xsl:template>

</xsl:stylesheet>
#
Re: Меню + InformationSystem
всегда выводится меню первого уровня:
    * Home
    * О компании
    * Philips 3D WOWvx Displays
    * 3D Контент
    * Технологии
    * Услуги
а надо чтобы выводилось со второго и раскрывалось
#
Re: Меню + InformationSystem
L0gic, в код XSL-шаблона добавьте(выделено жирным):
<?xml version="1.0" encoding="windows-1251"?>
<!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="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml" />

<xsl:template match="/document">
<ul>              
      <xsl:apply-templates select="structure[show=1]"/>
</ul>
  
</xsl:template>

<xsl:template match="structure">
  
   <!-- Запишем в константу ID структуры, данные для которой будут выводиться пользователю -->
   <xsl:variable name="current_structure_id"><xsl:choose>
      <xsl:when test="/document/ТекущийЭлемент/node()">item_<xsl:value-of select="/document/ТекущийЭлемент"/></xsl:when>
      <xsl:when test="/document/ТекущаяГруппа/node()">group_<xsl:value-of select="/document/ТекущаяГруппа"/></xsl:when>
      <xsl:otherwise><xsl:value-of select="/document/structure/current_structure_id"/></xsl:otherwise>
   </xsl:choose></xsl:variable>
  
      <!-- Показывать ссылку, или нет -->
      <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:if test="$current_structure_id=@id"><li><xsl:value-of disable-output-escaping="yes" select="name"/></li></xsl:if>
<xsl:if test="$current_structure_id!=@id"><li><a href="{$link}"><xsl:value-of disable-output-escaping="yes" select="name"/></a></li></xsl:if>

      </xsl:if>

      <!-- Если не показывать ссылку - выводим просто имя ссылки -->
      <xsl:if test="show_link=0">
         <li><xsl:value-of disable-output-escaping="yes" select="name"/></li>
      </xsl:if>

<xsl:if test="$current_structure_id=@id or count(.//structure[@id=$current_structure_id])=1">
<ul>              
      <xsl:apply-templates select="structure[show=1]"/>
</ul>
</xsl:if>


</xsl:template>

</xsl:stylesheet>
Авторизация