код вызова меню с передачей ID узла:
<?php
$structure = new Structure();
$param = array();
$external_propertys = array();
$InformationSystem = & singleton('InformationSystem');
$InformationSystem_id = $InformationSystem->GetInformationSystemByStructureId(CURRENT_STRUCTURE_ID);
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_groups'] = true;
$param['show_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_information_systems'][] = $InformationSystem_id;
}
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_groups'] = true;
$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_shop_groups'] = true;
}
}
}
$structure->ShowStructure(3, 'ВерхнееМеню', $param, $external_propertys);
?>
в шаблоне меню нужно заменить
<xsl:variable name="current_structure_id" select="/document/structure/current_structure_id"/>
на
<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>
во всех проверках "if test=current_structure_id = @id" заменить
current_structure_id
на
$current_structure_id