Copied to clipboard

Flag this post as spam?

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


  • Petras Surna 90 posts 144 karma points
    Apr 05, 2011 @ 07:26
    Petras Surna
    0

    Where is Razor documented?

    I was recently trying to find a way to do this:

    @Model.Children.Where("NodeTypeAlias == \"someAlias\"").Count()

    And I found it!

    But the question is, where is Razor documented?

    I am familair with Linq and could probably guess the .Where, .Count. .Next methods but where are the possible values of the quoted statements documented:

    eg

    NodeTypeAlias == \"someAlias\"

  • Alex 78 posts 136 karma points
    Apr 05, 2011 @ 09:27
    Alex
    1

    Hi Petras,

    I'm assuming you mean the umbraco classes rather than Razor itself. Probably the best source of documentation is from Gareth's posts on the Umbraco blog

    Umbraco 4.7 Razor Feature Walkthrough – Part 1

    Umbraco 4.7 Razor Feature Walkthrough – Part 2

    Umbraco Razor Feature Walkthrough – Part 3

    Umbraco Razor Feature Walkthrough – Part 4

    Umbraco Razor Feature Walkthrough - Part 5

    There is also the page in the wiki which is about DynamicNode's and DynamicNodeList's members and properties

    http://our.umbraco.org/wiki/reference/code-snippets/razor-snippets/dynamicnode-%28and-model%29-members-and-properties

    But to be honest the best way I have found to work with the new "Dynamic" classes which are used within the Razor Macros is to grab a copy of the source off of Codeplex and start having a good look through it.

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Apr 05, 2011 @ 09:46
    Sebastiaan Janssen
    0

    If you're referring to what "someAlias" can be: they are the aliasses of the properties that you have defined on your document type.

  • 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