XSLT Help on writing a macro to display current folder name
This is how I've got my site set up:
Home
- Sub Folder 1
- Sub Folder 2
- Sub Folder 3
--Sub Page 2
--Sub Page 3
When I'm on Sub Page 2 and Sub Page 3, my macro will display Sub Folder 3. When I'm on Sub Folder 3, I'd like it to say Sub Folder 3, unfortunately it says Home.
XSLT Help on writing a macro to display current folder name
This is how I've got my site set up:
Home
- Sub Folder 1
- Sub Folder 2
- Sub Folder 3
--Sub Page 2
--Sub Page 3
When I'm on Sub Page 2 and Sub Page 3, my macro will display Sub Folder 3. When I'm on Sub Folder 3, I'd like it to say Sub Folder 3, unfortunately it says Home.
Does anyone have any suggestions?
Just to be clear, Sub Page 2 and Sub Page 3 are under Sub Folder 3.
I assume text in bracket is document type.
Home (Home)
- Sub Folder 1 (subFolder)
- Sub Folder 2 (subFolder)
- Sub Folder 3 (subFolder)
--Sub Page 2 (subPage)
--Sub Page 3 ( subPage)
And let's try this one:
<xsl:choose>
<xsl:when test="name($currentPage) = 'subFolder'">
<xsl:value-of select="$currentPage/@nodeName"></xsl:value-of>
</xsl:when>
<xsl:when test="name($currentPage) = 'subPage'">
<xsl:value-of select="$currentPage/parent::* /@nodeName"></xsl:value-of>
</xsl:when>
</xsl:choose>
is working on a reply...