Skip to content

Instantly share code, notes, and snippets.

@nul800sebastiaan
nul800sebastiaan / gist:1170848
Created August 25, 2011 14:54
Get a specific crop using Umbraco 4.7.1 Razor engine
Given this XML:
<NewsItem id="1140" parentID="1139" level="3" writerID="0" creatorID="0" nodeType="1137" template="1138" sortOrder="1" createDate="2011-08-10T13:46:53" updateDate="2011-08-25T16:51:18" nodeName="Test newsitem" urlName="test-newsitem" writerName="admin" creatorName="admin" path="-1,1051,1139,1140" isDoc="">
<categories><![CDATA[allergy]]></categories>
<introText><![CDATA[Minime vero, inquit ille, consentit. Quod si ita se habeat, non possit beatam praestare vitam sapientia.]]></introText>
<bodyText><![CDATA[
<p>Ipsum.</p>
]]></bodyText>
<imageUpload>/media/2209/tulips.jpg</imageUpload>
<imageCrop>
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.