I see that you're using the image cropper for an Author Image, but if I add a crop to it, I don't see a way in the strongy typed model to then pull the crop of the image rather than just the default image itself. How do I go about doing that?
The PostModel and all other articulate models implement IPublishedContent, so you have direct access to all the normal ways of working with Umbraco data as well. So you can still do @Model.Content.GetPropertyValue ....
I can add a nicer way of doing it to the strongly typed model though if you want to create an issue for it?
Using the Articulate Image Cropper for Authors
I see that you're using the image cropper for an Author Image, but if I add a crop to it, I don't see a way in the strongy typed model to then pull the crop of the image rather than just the default image itself. How do I go about doing that?
The PostModel and all other articulate models implement IPublishedContent, so you have direct access to all the normal ways of working with Umbraco data as well. So you can still do @Model.Content.GetPropertyValue ....
I can add a nicer way of doing it to the strongly typed model though if you want to create an issue for it?
Well, in an ideal world full of unicorns and rainbows, I would want something like this: https://github.com/rustyswayne/Buzz.Hybrid/blob/master/src/Buzz.Hybrid/ImageExtensions.cs
In the meantime, I'll submit an issue for it and just use IPublishedContent ;) Thanks for clarifying!
Pretty sure your world of unicorns and rainbows already exists, no?
https://github.com/umbraco/Umbraco-CMS/blob/7.1.5/src/Umbraco.Web/ImageCropperTemplateExtensions.cs
Right, but that's off IPublisheContent and not a strongly typed image, isn't it?
(You'll have to forgive me, I'm jumping into this with a learning curb as we just started doing a Hybrid Framework for everything here)
Yup, so the underlying call to populate Articulate's AuthorModel is:
So until I add something nicer, you can create your own extension method on PostModel like :
Genius! Thank you so much for the help :)
is working on a reply...