Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 954 karma points
    Jul 14, 2011 @ 05:04
    Tom
    0

    Default Umbraco properties on @Model?

    Hi Guys,

    just wondering what the default umbraco values are on an item?

    i.e. @Model.Name

    @Model.Active

    what else is there?

    I think a list of the default properties available on the wiki would be good?

     

    I'm basically in a foreach and trying to work out

    foreach(var item in @Model.Children)

    {

    if(@item.DocType??? == "SomeDocType")

    {

    }

    }

     

    how do i check for the doctype?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 14, 2011 @ 08:33
    Dennis Aaen
    1

    Hi Tom,

    I found this list on the wiki about properties on the DynamicNode and Model.

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

    I have not had the opportunity to look at Razor yet, so it's not much knowledge I have of this.

    So I hope this can help you.

    /Dennis

     

  • Tom 713 posts 954 karma points
    Jul 14, 2011 @ 08:36
    Tom
    0

    Thanks so much!

    that's EXACTLY what i was looking for!

    Cheeers Dennis!

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 14, 2011 @ 08:41
    Dennis Aaen
    0

    Hi Tom,

    I´m glad that I could help you :-)

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft