Copied to clipboard

Flag this post as spam?

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


  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Apr 06, 2011 @ 12:42
    Tim Geyssens
    0

    Listing all children of a certain doc type

    Say you want to display the latest news on your homepage

    And you have this structure

    - Home

    --Subpage

    --NewsArea

    ----NewsItem

    How can you get all newsitems from a razor macro on your homepage?

  • Alex 78 posts 136 karma points
    Apr 06, 2011 @ 12:45
    Alex
    2

    You should be able to use this, which will return a DynamicNodeList.

    Model.Descendants("NewsItem")

     

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Apr 06, 2011 @ 12:49
    Sebastiaan Janssen
    1

    Yep, "NewsItem" is a filter on NodeTypeAlias, and it works great, very convenient.

  • 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