Answer the question
In order to leave comments, you need to log in
How to display parent in template, xslt, umi?
Hi all!
I'm struggling with a task that seems to be trivial for more than a day. If anyone can tell me what is wrong?
There is a template through which I display a list of directories on the main page using a macro:
code:
<!-- Пример для списков getCategoryList - версия 2 -->
<xsl:template match="udata[@method = 'getCategoryList']" mode="test">
<ul>
<xsl:apply-templates select="//item" mode="test" />
</ul>
</xsl:template>
<xsl:template match="udata[@method = 'getCategoryList']//item" mode="test">
<li>
<a href="{@link}" >
<xsl:value-of select="." />
</a>
<xsl:apply-templates select="document(concat('udata://catalog/getCategoryList/void/', @id, '//1/'))" mode="test1"/>
</li>
</xsl:template>
<xsl:template match="udata[@method = 'getCategoryList']" mode="test1">
<h3 style="color:red"><xsl:value-of select="ancestor::*"/></h3> *
<ul>
<xsl:apply-templates select="items" mode="test1"/>
</ul>
</xsl:template>
<xsl:template match="udata[@method = 'getCategoryList']//item" mode="test1">
<li>
<a href="{@link}" >
<xsl:value-of select="." />
</a>
</li>
</xsl:template>
<xsl:apply-templates select="document('udata://catalog/getCategoryList/1/(shop)/23//0/?extProps=header_pic,header,title,result')/udata"/>
<xsl:value-of select="ancestor::*"/>
<xsl:copy-of select="ancestor::item" />
Answer the question
In order to leave comments, you need to log in
I don't quite understand the problem, can you be more specific?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question