Umbraco Contour & Razor Bug

A quick note for something that has cost me considerable time working out. If you are using Umbraco’s contact form package Contour and you insert a contact form into your page via a richtext box editor.

Make sure in your template you are not using a Razor macro to insert the content of your richtext box, use the normal XSLT method. Your form won’t show otherwise.

So don’t do this to include your richtextbox:

<umbraco:Macro runat=”server” language=”cshtml”>

     @Model.myRichTextBox

</umbraco:Macro>

Do this:

<umbraco:Item field=”myRichTextBox” runat=”server”></umbraco:Item>

UPDATE (12/10/2011)

It has come to my attention that this is not a problem with Contour, it is to do with the rich text editor having issues with macros when you embed the rich text editor into your templates using Razor.

As you can tell from Niels Hartvig’s tweet, this will be resolved down the line.

  1. alanfeekery posted this
blog comments powered by Disqus