14 votes

RazorControl for Juno

 

RazorControl is an experiment that lets you use the Razor ViewEngine from Microsoft directly in Umbraco templates. The implementation might change and should in the current state be treated as nothing but an experiment!

If the experiment becomes a staple succes it could be seen as a serious alternative to XSLT (that's the design goal!).

It stands on the shoulders of the brilliant work with wrapping Razor done by Matthew Abbott (http://www.fidelitydesign.net/?p=239) and BuildStarted (http://buildstarted.com/2010/11/02/razor-without-mvc-part-ii). Not to mention the work by the Razor team at Microsoft.

Requirements:

 

  • Microsoft .NET 4
  • Either a final beta of Juno (not released at the time of this writing) or a nightly build of Juno dated November 9th or later: http://nightly.umbraco.org/umbraco%204.6
Code Sample:

 

<Razor:Template runat="server" CacheTemplate="false">
@foreach(var news in Model.Children) {
   <h3 class="headline">
      <a href="@news.Url">@news.Name</a>
   </h3>
   <small class="meta">Posted: @news.CreateDate</small><br />
   <p class="introduction">@news.Introduction</p>
}
</Razor:Template>

 

Archived files

Documentation

Source code

Package owner

Niels Hartvig

Niels Hartvig

Niels has 2332 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
7.12.x (untested)
7.11.x (untested)
7.10.x (untested)
7.9.x (untested)
7.8.x (untested)
7.7.x (untested)
7.6.x (untested)
7.5.x (untested)
7.4.x (untested)
7.3.x (untested)
7.2.x (untested)
7.1.x (untested)
7.0.x (untested)
6.1.x (untested)
6.0.x (untested)

You must login before you can report on package compatibility.

Package Information

  • Package owner: Niels Hartvig
  • Created: 10/11/2010
  • Current version 0.1
  • License MIT
  • Downloads: 875