Using the new Image Cropper in legacy Razor MacroScripts
Hi everyone,
I'm still getting to grips with Umbraco 7.1 and I still work a lot with the legacy Razor MacroScripts. My biggest problem is rendering image crops with the new image cropper inside a legacy Razor script, does anyone know if this is this actually possible? I have set up the new image cropper correctly (and managed to render crops within a Partial View macro), but using similar code in a legacy Razor script does not produce anything!
My other attempted solution was to create a Partial View macro specifically for image crops, passing through an image id from a legacy Razor script, but I can't seem to render out a Partial View inside a legacy script at all! Is this also not possible?
Using the new Image Cropper in legacy Razor MacroScripts
Hi everyone,
I'm still getting to grips with Umbraco 7.1 and I still work a lot with the legacy Razor MacroScripts. My biggest problem is rendering image crops with the new image cropper inside a legacy Razor script, does anyone know if this is this actually possible? I have set up the new image cropper correctly (and managed to render crops within a Partial View macro), but using similar code in a legacy Razor script does not produce anything!
My other attempted solution was to create a Partial View macro specifically for image crops, passing through an image id from a legacy Razor script, but I can't seem to render out a Partial View inside a legacy script at all! Is this also not possible?
Kind Regards
Hi Pronto,
While I would strongly urge you to refactor your MacroScripts to Partial View Macros, it should be possible to get crops using something like this:
Jeavon
Hi Jeavon,
Thanks for the reply, I think I'm just going to take your advice and drop the legacy macros completely!
Kind Regards
Is worth doing and there aren't that many changes really, you will see a performance improvement especially for collections like Descendants
is working on a reply...