My first week with Razor.

So I started to check out the Razor syntax now supported in umbraco. Just for fun I decided to try to convert a pretty xslt-heavy site to Razor scripts, just for the practice of it.
I gotta say I love it already, the syntax is so much shorter and dare I say “readable by non-programmers”. Of course designers aren’t supposed to write Macros for umbraco from the bottom but It’d of course be nice if they’re able to make small adjustments if necessary.
I’m soon enough going to start posting som razor snippets on snipplr, but I thought I’d just give a glance of what its all about right here:

fx a breadcrumb path in umbraco might look something like this with razor:

@* <- umbraco dynamic node reference *@
  <ul class="breadcrumbs">
    @foreach(var page in Model.Ancestors().Where("umbracoNaviHide != true").Where("level > 1"))
       <li><a href="@page.Url">@page.Name</a></li>

I try to make a habit of putting a link to the umbraco dynamic node reference in the top of my razor script, for quick access for the next generations who have to fix my code.
If you’ve dealt with xslt you’ll notice that this is a indeed