1
Шаблоны XSLT / Re: Вывод подкатегории
« : 02 Октября 2018, 13:10:45 »
Создаем xsl:variable с названием list_cat
Создаем шаблон вывода каталогов
Вызываем шаблон.
Код: [Выделить]
<xsl:variable name="list_cat" select="document('udata://catalog/getCategoryList/void//0/1/')/udata/items" />
Создаем шаблон вывода каталогов
Код: [Выделить]
<xsl:template match="item" mode="catalog_list">
<div class="catalog">
<div class="img">
<img src="{document(concat('upage://',@id))/udata/page/properties/group[@name='more_params']/property[@name='header_pic']/value}" alt="{.}" title="{.}" />
</div>
<div class="items">
<a href="{@link}" title="{.}" class="link"><xsl:value-of select="." /></a>
<p class="text">
<xsl:value-of select="document(concat('upage://',@id))/udata/page/properties/group[@name='polya_dlya_kataloga_turov']/property[@name='nachalo_tura']/value" />
</p>
</div>
</div>
</xsl:template>
Вызываем шаблон.
Код: [Выделить]
<xsl:apply-templates select="$list_cat" mode="catalog_list" />