I am having problems with the xslt / related links control
I have a div section in the template where this xslt macro is to be put, but I do not want the header to show if the are is empty, but must show the header if umbraco is in canvas edit mode.
Im trying to make this not show when either conditions are fullfilled
Umbraco is not in Canvas Edit mode
There are no links in the related links control.
but it must show when
Umbraco is in Canvas Edit mode
No matter if there are links in the related links control
I have supplyed my xslt code here, and I simply cant find out where it goes wrong, I suspect its the if statement that surrounds the whole block.
XSLT - Related links, and Items...
Hello Guys
I am having problems with the xslt / related links control
I have a div section in the template where this xslt macro is to be put, but I do not want the header to show if the are is empty, but must show the header if umbraco is in canvas edit mode.
Im trying to make this not show when either conditions are fullfilled
but it must show when
I have supplyed my xslt code here, and I simply cant find out where it goes wrong, I suspect its the if statement that surrounds the whole block.
<xsl:if test="count($currentPage/data [@alias = 'quick']/links/link) > 0 or ($currentPage/data [@alias = 'quick'] >= '' and umbraco.library:Item($currentPage/@id, 'quick', '') != '')">
<div class="box">
<h2>Quick Links</h2>
<ul class="nobullet">
<xsl:for-each select="$currentPage/data [@alias = 'quick']/links/link">
<li>
<a>
<xsl:if test="./@newwindow = '1'">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="./@type = 'external'">
<xsl:attribute name="href">
<xsl:value-of select="./@link"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">
<xsl:value-of select="umbraco.library:NiceUrl(./@link)"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="./@title"/>
</a>
</li>
</xsl:for-each>
</ul>
<xsl:value-of select="umbraco.library:Item($currentPage/@id, 'quick', '')" />
</div>
I will be greatfull for any help you could spare me
/Robin
I'm trying to solve the same problem. Anyone?
Robin, it appears that you are not closing your if tag:
</xsl:if>
is working on a reply...