Copied to clipboard

Flag this post as spam?

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


  • Bent Holz 100 posts 273 karma points
    Mar 26, 2014 @ 10:01
    Bent Holz
    0

    Simple xslt buy/sell board... and yet

    Hi all...

    I'm trying to create a very simple board, where I can post stuff people want to buy/sell.

    Setup is like this:

    Frontpage
    Page 1
    Page 2
    Page 3
    Buy and sell
    Buyer/seller 1
    Item 1
    Item 2
    Buyer/seller 2
    Item 1
    Item 2

    On the page "Buy and Sell" I would like to list all items people want to sell or buy.

    When creating a macro listing all sub pages from current page I get Buyer/seller 1 + 2, and if I make a macro listing whole structure, I get the items but the buyer/seller as well.

    So how do i get XSLT to list the sub nodes of the sub nodes to the Buy and sell page?

    Thx for your time...

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 26, 2014 @ 10:04
    Jan Skovgaard
    1

    Hi Crawn

    What does your current code look like?

    And What document type aliases are you using for the different pages?

    /Jan

  • Bent Holz 100 posts 273 karma points
    Mar 26, 2014 @ 10:28
    Bent Holz
    0

    Hi Jan

    Right now i just have the standard code for the two macro's:

    List subpages from current:

    <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>

    List whole structure from current:

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

    Document types:
    Buy and sell: BuyAndSell 
    Buyer/seller:  buysellPerson
    Item:  buysellItem

    /Crawn

     

  • Kim Nedergaard 37 posts 144 karma points
    Mar 26, 2014 @ 10:29
    Kim Nedergaard
    0

    Do you want to show the subnodes from the "Buy ans sell"-node.

    On the "Page 1" and the "Page 2"-node?

  • Kim Nedergaard 37 posts 144 karma points
    Mar 26, 2014 @ 10:31
    Kim Nedergaard
    101
    <ul>
    <xsl:for-each select="$currentPage/descendant::buysellItem [@isDoc and string(umbracoNaviHide) != '1']">
    <li>
    <a href="{umbraco.library:NiceUrl(@id)}">
    <xsl:value-of select="@nodeName"/>
    </a>
    </li>
    </xsl:for-each>
    </ul>
    

    Could do the trick - I think.

  • Bent Holz 100 posts 273 karma points
    Mar 26, 2014 @ 10:42
    Bent Holz
    0

    Hi Kim...

    Ahhh... the "*" is all and by naming the alias, it only lists the ones with the alias "buysellItem"... So simple thx...

    <xsl:for-each select="$currentPage/descendant::buysellItem [@isDoc and string(umbracoNaviHide) != '1']">

    Thx for helping out...

    Cheers!

    /Crawn

  • Kim Nedergaard 37 posts 144 karma points
    Mar 26, 2014 @ 10:50
    Kim Nedergaard
    0

    No problemmo :)

Please Sign in or register to post replies

Write your reply to:

Draft