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 5061 posts 15544 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.

    Continue discussion

Please Sign in or register to post replies