x First time here? Check out the FAQ

Razor snippets

    Umbraco 4.7 Razor Feature Walkthrough (Gareth Evans)

    Part 1

    • Why the new functionality?
    • IEnumerable handling, we can do better
    • Simplistic IEnumerable method support

    Part 2

    • Macro Parameters
    • DynamicNode Constructors [string | int | object]
    • DynamicMedia vs Media Properties
    • DynamicMedia ctor string,int,object)
    • DynamicNode .NodeById & .MediaById

    Part 3

    • AncestorOrSelf
    • Ancestors
    • Type Safety
    • XML Properties
    • Custom Extension Methods
    • XPath helper

    Part 4

    • Where with lambda-like syntax
    • OrderBy
    • Extention method

    Part 5

    • DateTime property support
    • IsProtected & HasAccess
    • Better tree navigation
    • Contains & ContainsAny
    • MediaById & NodeById new overloads
    • DynamicNull
    • IHtmlString

    Part 6

    • DateTime property support 
    • DynamicXml fixes and changes
    • New methods on DynamicNode

    • - HasProperty

    • - Index (or Position)

    • Pluck | Select

    Part 7

    • DynamicNode.Where
    • [I]RazorDataTypeModel - Datatype Developers Property Data / Model interface
    • IsHelper
    • IsFirstIsNotFirstIsLastIsNotLastIsPosition, IsNotPositionIsModZero, IsNotModZeroIsEven, IsOddIsEqualIsDescendant,IsDescendantOrSelf,IsAncestor,IsAncestorOrSelf

    Part 8

    • @Library introduction
    • @Library Mix-Ins/Extensions - Add your own
    • Coalesce, Concatenate and Join
    • NodeById, NodesById
    • @Library.If
    • @Library.ToDynamicXml
    • @Library.Truncate

    Community resources

    Umbraco Razor - Intellisense and Debugging (video by Douglas Robar)

    External Razor resources

    Great libraries that gives your Umbraco Razor a boost

    uQuery comes with the uComponents package. Just install it and you are ready to go.

    uQL is a query DSL/Framework for umbraco. It uses the same design pattens as LINQ to query over umbraco's in-memory xml cache. (UQL = umbraco query language)

    Community blogs about Razor

    http://www.aaron-powell.com/umbraco-4-and-razor

    How to Add Razor Syntax in Umbraco 4.6.1? blog.pbdesk.com/.../razor-support-in-umbraco.html