Шаблон имеющийся:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet SYSTEM "ulang://i18n/constants.dtd:file" [<!ENTITY nbsp " ">]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:umi="http://www.umi-cms.ru/TR/umi">
<xsl:variable name="document-page-parent-id" select="/result/parents" />
<xsl:template match="udata[@method = 'getCategoryList']" mode="left-column">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<xsl:apply-templates select="//item" mode="left-column" />
</table>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="udata[@method = 'getCategoryList']//item" mode="left-column">
<xsl:choose>
<xsl:when test='$document-page-id=@id or $document-page-parent-id/page/@id=@id'>
<tr>
<td style="background: url(/templates/demodizzy/images/menu4_bg.png) no-repeat left; width: 194px; height: 35px;" valign="top"><div style="margin-left: 9px; line-height: 29px;"><font style="text-decoration: none; font-size: 12px;"><xsl:value-of select="." /></font></div></td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<td style="background: url(/templates/demodizzy/images/menu3_bg.png) no-repeat left; width: 194px; height: 35px; cursor: pointer;" valign="top" onmouseover="this.style.background='url(/templates/demodizzy/images/menu4_bg.png) no-repeat left';" onmouseout="this.style.background='url(/templates/demodizzy/images/menu3_bg.png) no-repeat left';" onclick="location.href='{@link}';"><div style="margin-left: 9px; line-height: 29px;"><a href="{@link}" style="text-decoration: none; font-size: 12px;"><xsl:value-of select="." /></a></div></td>
</tr>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="document(concat('udata://catalog/getCategoryList/void/', @id, '//1/'))" />
<tr><td height="23px"> </td></tr>
</xsl:template>
</xsl:stylesheet>
С ним выводится только 2 уровня, не могу догнать как сделать неограниченное количество уровней. Если версту надо поменять - сделаем, это не проблема
Даже при таком шаблоне, взятом с оригинального сайта, выводится всего 2 уровня ( У меня их 3. Причем третий должен открываться при выборе второго уровня:
<xsl:template match="udata[@method = 'getCategoryList']" mode="left-column">
<ul class="catalog_menu" umi:button-position="bottom left"
umi:element-id="{@category-id}" umi:region="list" umi:module="catalog" umi:sortable="sortable">
<xsl:apply-templates select="//item" mode="left-column" />
</ul>
</xsl:template>
<xsl:template match="udata[@method = 'getCategoryList']//item" mode="left-column">
<li umi:element-id="{@id}" umi:region="row">
<span>
<a href="{@link}" umi:field-name="name" umi:delete="delete" umi:empty="&empty-section-name;">
<xsl:value-of select="." />
</a>
</span>
<xsl:apply-templates select="document(concat('udata://catalog/getCategoryList/void/', @id, '//1/'))" />
</li>
</xsl:template>
Что сделать?
Вопрос был решен при помощи CSS: изначально идет рекурсивная выборка все каталогов, через стили третий уровень скрыт, затем при переходе на второй уровень добавляю списку класс active и в стилях по этому классу показываю нужный третий уровень. Привязка левого меню и страницы позиции каталога сделалсь при помощи переменной в default.xsl
<xsl:variable name="document-page-parent-id" select="/result/parents/page/@id" />
Полный шаблон left-column-category-list.xsl:
<xsl:template match="udata[@method = 'getCategoryList']" mode="left-column">
<ul umi:button-position="bottom left"
umi:element-id="{@category-id}" umi:region="list" umi:module="catalog" umi:sortable="sortable">
<xsl:apply-templates select="//item" mode="left-column" />
</ul>
</xsl:template>
<xsl:template match="udata[@method = 'getCategoryList']//item" mode="left-column">
<li umi:element-id="{@id}" umi:region="row">
<xsl:if test="(@id=$document-page-id) or (@id=$document-page-parent-id)">
<xsl:attribute name="class" ><xsl:text>active</xsl:text></xsl:attribute>
</xsl:if>
<a href="{@link}" umi:field-name="name" umi:delete="delete" umi:empty="&empty-section-name;">
<xsl:value-of select="." />
</a>
<!--xsl:if test="@id=$document-page-id or @id=/result/parents/page/@id"-->
<xsl:apply-templates select="document(concat('udata://catalog/getCategoryList/void/', @id, '//1/'))" mode="left-column" />
<!--/xsl:if-->
</li>
</xsl:template>
Результат (http://www.ledsdoit.ru/shop/svetilniki_svetodiodnye/dlya_doma/nastolnye/svetodiodnyj_svetil_nik_ledino_black_3x2_5w/)