Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys.. under the new schema in a loop how do i check if the current node is a given doc type
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <xsl:if test="@id = $currentPage/@id"> <xsl:attribute name="class">current</xsl:attribute> </xsl:if> <a class="navigation" href="{umbraco.library:NiceUrl(@id)}"> <span><xsl:value-of select="@nodeName"/></span> </a> </li></xsl:for-each>
Inside that for-each I'd love to do a check like
<xsl:if test="./data [@nodeTypeAlias = 'SomeNode']"><xsl:call-template name="moo"/></xsl:if>
Hi Tom,
<xsl:if test="name()='NameOfContentType'"> Insert code here </xsl:if>
Rich
I think you can also do this:
<xsl:if test="self::NameOfContentType"> Insert code here </xsl:if>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
In Loop How Do I Check if node is a given doc type
Hi guys.. under the new schema in a loop how do i check if the current node is a given doc type
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<xsl:if test="@id = $currentPage/@id">
<xsl:attribute name="class">current</xsl:attribute>
</xsl:if>
<a class="navigation" href="{umbraco.library:NiceUrl(@id)}">
<span><xsl:value-of select="@nodeName"/></span>
</a>
</li>
</xsl:for-each>
Inside that for-each I'd love to do a check like
Hi Tom,
<xsl:if test="name()='NameOfContentType'">
Insert code here
</xsl:if>
Rich
I think you can also do this:
<xsl:if test="self::NameOfContentType">
Insert code here
</xsl:if>
is working on a reply...