Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Kevin Coster 83 posts 120 karma points
    May 21, 2014 @ 09:39
    Kevin Coster

    A-Z pointing to Parent Node

    Hi All I have been looking for some code that will list A-Z content on my site have found the following which displays everything I need but want it to point to a specific Content Item and list child items not everything... But struggling to see how or where I can do that with the following XSLT

    <xsl:param name="currentPage" />
    <xsl:template match="/">
        <xsl:variable name="letters" select="umbraco.library:Split('A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z', ',')" />
        <xsl:apply-templates select="$letters" mode="list" />
    <xsl:template match="value" mode="index">
            <a href="#{text()}">
                <xsl:value-of select="text()"/>
    <xsl:template match="values" mode="list">
        <div class="wrapper">
            <xsl:apply-templates select="value" mode="list" />
    <xsl:template match="value" mode="list">
        <xsl:variable name="letter" select="text()" />
        <xsl:for-each select="$currentPage/@*[1]">
            <xsl:if test="key('document-starts-with', $letter)">
                <div id="{$letter}">
                        <xsl:value-of select="$letter"/>
                        <xsl:apply-templates select="key('document-starts-with', $letter)" mode="list" />
    <xsl:template match="*[@isDoc]" mode="list">
            <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:value-of select="@nodeName"/>

Please Sign in or register to post replies

Write your reply to: