Copied to clipboard

Flag this post as spam?

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


  • Dinovo 40 posts 59 karma points
    Jan 23, 2010 @ 11:24
    Dinovo
    0

    Showing subpages below currentPage and 'relatedø pages?

    I have a setup currently where a list of the subpages (1 level below the current page) is showed in a list. On the subpage document type i have a property called 'Also show in' which is a 'Ultimate picker' type that basicly shows the whole content tree of subpages.

    My structure could be:
    - Home
    -- Subpage 1
    --- Subsub1page 1
    --- Subsub1page 2
    --- Subsub1page 3
    -- Subpage 2
    --- Subsub2page 1
    --- Subsub2page 2
    --- Subsub2page 3

    When entering the Subpage 2 page it currently shows the 3 children as it should. But if i on the page "Subsub1page 1" select "Subpage 2" in my "Also show in" property i would like this page to also show up in that for-each loop. It will have to be somehow included in the same for-each loop, so i can sort on them in one big pool with the "real subpages" of that node.

    Any ideas?

  • Dinovo 40 posts 59 karma points
    Jan 23, 2010 @ 14:54
    Dinovo
    0

    I now have 2 for-each loops getting 2 different types of data;

    <xsl:for-each select="$currentPage/ancestor-or-self::root//node [string(data [@alias='umbracoNaviHide']) != '1' and contains(string(data [@alias='multipleCats']), string($currentPage/@id))]">

    and

    <xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) != '1' and @template = '1055']">

    The first one displays the subpages that has been "related" to the $currentPage and the second one showing the children of the $currentPage. But how do i combine these 2 for-each loops into one loop, so i can sort on them etc.?

  • Dinovo 40 posts 59 karma points
    Jan 23, 2010 @ 15:22
    Dinovo
    0

    Ahh - basic XPath operator to the rescue | :-)

    The new and completed select looks like this;

    <xsl:for-each select="$currentPage/ancestor-or-self::root//node [string(data [@alias='umbracoNaviHide']) != '1' and contains(string(data [@alias='multipleCats']), string($currentPage/@id))] | $currentPage/node [string(data [@alias='umbracoNaviHide']) != '1' and @template = '1055']">

  • 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