Copied to clipboard

Flag this post as spam?

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


  • Thomas Park 1 post 21 karma points
    Dec 03, 2014 @ 14:27
    Thomas Park
    0

    List Pages under a Fixed Node

    Hi Guys,

    I was wonder how do I go about listing pages under a fixed Node. So if I had a node that looks something like this:

    Rooms
    - Room 1
    - Room 2
    - Room 3
    - Room 4

    Using XSLT how would I go about just listing the ROOM 1, ROOM 2... with the XSLT being in the Room Master Page. 

    I have been looking at the Code provided by Umbraco to list page under a changeable source but I havent figured out yet how to fix the source to a single node. 

    Also is this the best way to go about doing this or is there a better way to achive what im trying to do?

    Kind Regards

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 03, 2014 @ 14:32
    Dennis Aaen
    1

    Hi Thomas and welcome to our.

    With this XSLT you should get the children to the rooms page. If you place the XSLT macro on the template for the Rooms page.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxml="urn:schemas-microsoft-com:xslt"
        xmlns:umbraco.library="urn:umbraco.library" xmlns:Examine="urn:Examine" xmlns:TC="urn:TC"
        exclude-result-prefixes="msxml umbraco.library Examine TC ">

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">

    <!-- The fun starts here -->
    <ul>
    <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
        <li>
            <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:value-of select="@nodeName"/>
            </a>
        </li>
    </xsl:for-each>
    </ul>

    </xsl:template>

    </xsl:stylesheet>

    Hope this helps, if you have other questions about this keep asking.

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft