16
Настройка системы и модулей / Re: Перенести настройки модуля шаблоны данных
« : 27 Февраля 2016, 17:47:57 »
может быть через модуль обмена данными?
В этом разделе можно просмотреть все сообщения, сделанные этим пользователем.
<xsl:template match="udata[@module = 'content'][@method = 'menu']" mode="top_menu">
<xsl:apply-templates select="item" mode="top_menu" />
</xsl:template>
<xsl:template match="udata[@module = 'menu']/item" mode="top_menu">
<li class="tab">
<span><xsl:value-of select="." /></span>
<xsl:apply-templates select="document(concat('udata://content/menu/0/2/', @id))/udata" mode="top_drop">
<xsl:with-param name="position" select="position()" />
</xsl:apply-templates>
</li>
</xsl:template>
<xsl:template match="udata" mode="top_drop" />
<xsl:template match="udata[items]" mode="top_drop">
<xsl:param name="position" />
<div class="tab-content">
<xsl:apply-templates select="items/item" mode="top_drop" />
<div>
<xsl:choose>
<xsl:when test="$position = 1"><xsl:attribute name="class">menu__wrap row-4</xsl:attribute></xsl:when>
<xsl:when test="$position = 2"><xsl:attribute name="class">menu__wrap row-3x3</xsl:attribute></xsl:when>
<xsl:when test="$position = 3"><xsl:attribute name="class">menu__wrap row-3x3</xsl:attribute></xsl:when>
<xsl:when test="$position = 4"><xsl:attribute name="class">menu__wrap row-3x4</xsl:attribute></xsl:when>
</xsl:choose>
<ul>
<xsl:apply-templates select="items/item" mode="top_drop" />
</ul>
</div>
</div>
</xsl:template>