tag:blogger.com,1999:blog-8389762629078434869.post1939457321618250154..comments2024-03-05T06:52:40.648+00:00Comments on anthonydotnet: Image Gen, Image Cropper, DAMP, and Sencha with UmbracoAnthonyhttp://www.blogger.com/profile/18023903313258125606noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8389762629078434869.post-15001769769548148002012-01-03T11:38:01.061+00:002012-01-03T11:38:01.061+00:00NiceNiceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8389762629078434869.post-65274222063158949742011-11-01T23:27:08.085+00:002011-11-01T23:27:08.085+00:00Hey Jeroen
Yes it is on a document. One project s...Hey Jeroen<br /><br />Yes it is on a document. One project specifically required image cropping in a document, not in the media section. BUT required media to be uploaded through the document in the content section. Hence using DAMP. That is when the AfterSave code was born back in Umbraco 4.5.2 :)<br /><br />Yes, when uploading in the Media section, the Image cropper will work out of the box if it is on the media node. <br /><br />Regarding DynamicXml...<br /><br />The macro script has 2 modes which allows being called from <umbraco:macro /> or using @RenderPage from another cshtml file. <br /><br />I instantiate a DynamicNode using either PageData[0] or Model.Id. Although you can do Model.SomeProperty.SomeArray[0].someAttrib etc, you cannot do it on an instantiated DynamicNode. <br /><br />I normally deal with an instantiated DynamicNode over Model because I like the intellisense, and I have extension methods. Model does not like extension methods. There is also an apparent performance hit when using Model.Anthonyhttps://www.blogger.com/profile/18023903313258125606noreply@blogger.comtag:blogger.com,1999:blog-8389762629078434869.post-83290443839815354742011-11-01T21:25:00.129+00:002011-11-01T21:25:00.129+00:00Hello,
Thanks for this blog post. In your code do...Hello,<br /><br />Thanks for this blog post. In your code do you use the Image Cropper on the documenttype? I always add the crop to the mediatype (and use custom mediatypes for this). A mediatype already has the umbracoFile property so you don't need to do anything special. Here you can see a demo how this will look: http://www.screenr.com/gz0s If you want more info about this I will demo it at the Umbraco UK festival.<br /><br />Also I see in your Razor code you don't use any code which is created for Umbraco like the DynamicXml code. Here are some blogposts about it:<br /><br />http://umbraco.com/follow-us/blog-archive/2011/2/28/umbraco-razor-feature-walkthrough-%E2%80%93-part-3<br /><br />http://umbraco.com/follow-us/blog-archive/2011/9/15/umbraco-razor-feature-walkthrough%E2%80%93part-6.aspx<br /><br /><br />If you want some examples on how easy it is to get the umbracoFile you can install the DAMP 2.0 Samples package. This install also has a Razor file with some code. You can download it here: http://our.umbraco.org/FileDownload?id=3145<br /><br />Thanks for writting this blogpost. It's very useful!<br /><br />Regards,<br />Jeroen BreuerJeroen Breuerhttps://www.blogger.com/profile/06002634591368167070noreply@blogger.com