Copied to clipboard

Flag this post as spam?

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


  • Topic author was deleted

    Apr 06, 2011 @ 12:42

    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 5060 posts 15522 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.

Please Sign in or register to post replies

Write your reply to:

Draft