Copied to clipboard

Flag this post as spam?

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


  • Ben McKean 260 posts 515 karma points
    Jan 24, 2013 @ 10:42
    Ben McKean
    0

    MNTP XSLT problem

    Hi

    I'm using a MNTP. I want to select all pages of a doc type called "HousingAssociation". These pages can have sub pages.

    I want to just display all pages of HousingAssociation type for the user to select. I don't want to display any sub pages.

    Its been a while since I've done any XSLT so I may be missing something. Here is my code:

    $currentPage/ancestor-or-self::Home//HousingAssociation

    I've written this in an XSLT script and used the visualiser and it does what I'd like it to. However when I past it into the XPathExpression field for the MNTP it doesn't behaving the same. The MNTP shows (it only shows the first one):

    Housing Association 1
    Sub page 1
    Sub page 2
    Sub page 3

    I can use the filter to only allow selecting of the HousingAssociation but I still can't see the other HousingAssociations and also I want to hide the sub pages from the user.

    Any help appreciated

    Thanks

    Ben

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Jan 24, 2013 @ 10:47
    Lee Kelleher
    100

    Hi Ben,

    The XPath expression for MNTP is used to select a start node only, it wont pre-select a collection of nodes to be displayed in the tree.

    If you only want to select from a specific set of nodes, then take a look at either XPathCheckBoxList or XPathDropDownList.

    (If you are using the uComponents package - then there is also an XPathAutoComplete data-type)

    Cheers, Lee

  • Ben McKean 260 posts 515 karma points
    Jan 24, 2013 @ 10:53
    Ben McKean
    0

    Great, thanks Lee and thanks for quick response. 

    That makes sense.

    XPathCheckBoxList does exactly what I need so I'll use that.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies