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.

Advertisements

Published by

Alan Feekery

Developer, Gamer, Musician, Cyclist and big Motorsport fan... enjoys the odd cup of coffee :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s