видимо Undefined variable: current_structure_id
нужно передать id текущей группы через external_propertys, как в хлебных крошках
вызов меню:
<?php
$InformationSystem = & singleton('InformationSystem');
$InformationSystem_id = $InformationSystem->GetInformationSystemByStructureId(CURRENT_STRUCTURE_ID);
$param = array();
$external_propertys = array();
if ($InformationSystem_id)
{
$result = $InformationSystem->GetInformationFromPath($InformationSystem_id, '', false);
if ($result['item'])
{
$item_id = $InformationSystem->GetIdInformationItem($result['item'], $result['group'], $InformationSystem_id);
if ($item_id != 0)
{
$external_propertys['item'] = $item_id;
$param['show_items'] = array($item_id);
}
}
else
{
$item_id = false;
}
if (is_array($result) && $result['group'] > 0)
{
$external_propertys['group'] = $result['group'];
}
}
elseif (class_exists('shop'))
{
$shop = & singleton('shop');
$shop_row = $shop->GetShopWhithStructureId(CURRENT_STRUCTURE_ID, CURRENT_SITE);
if ($shop_row)
{
$result = $shop->GetItemPath($shop_row['shop_shops_id'], '', false);
if ($result['item'])
{
$item_id = $result['item'];
if ($item_id != 0)
{
$external_propertys['item'] = $item_id;
$param['show_shop_items'] = array($item_id);
}
}
else
{
$item_id = false;
}
if (is_array($result) && $result['group'] > 0)
{
$external_propertys['group'] = $result['group'];
}
}
}
$param['show_groups'] = true;
$param['show_shop_groups'] = true;
$structure = & singleton('Structure');
$structure->ShowStructure(false, 'ШаблонМеню', $param, $external_propertys);
?>
XSL:
<xsl:variable name="current_structure_id">
<xsl:choose>
<xsl:when test="/document/item/node()">item_<xsl:value-of select="/document/item"/></xsl:when>
<xsl:when test="/document/group/node()">group_<xsl:value-of select="/document/group"/></xsl:when>
<xsl:otherwise>
<xsl:value-of select="/document/structure/current_structure_id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<li>
<xsl:if test="not($current_structure_id = @id or count(.//structure[@id=$current_structure_id]) = 1)">
<xsl:attribute name="class">closed</xsl:attribute>
</xsl:if>
...