GetCropUrl in Razor / Using Crops in the Rich Editor.
Hi All,
I know how to use GetCropUrl with MCV (currentPage). But I can't find out how to use GetCropUrl with Razor (Model).
Please help because I have finally found something where I can't how not to use Razor.
Otherwise please tell me how I can call a Partial view from Razor easilly.
Basically I am inserting a Macro into the Rich editor, so I can used cropped inmages in the Rich editor. So If someone has an even slicker way of doing that than great thanks.
GetCropUrl in Razor / Using Crops in the Rich Editor.
Hi All,
I know how to use GetCropUrl with MCV (currentPage). But I can't find out how to use GetCropUrl with Razor (Model).
Please help because I have finally found something where I can't how not to use Razor.
Otherwise please tell me how I can call a Partial view from Razor easilly.
Basically I am inserting a Macro into the Rich editor, so I can used cropped inmages in the Rich editor. So If someone has an even slicker way of doing that than great thanks.
Thanks
Stephen
Hi Stephen,
Your macro should be a Partial View Macro, then you have CurrentPage and can do what you already know with GetCropUrl
"Razor Macro" are legacy only and shouldn't generally be used.
Does that make sense?
Jeavon
Hi Jeavon,
Perfect, thanks.
All sorted now.
Took me a little time to work out how to pull parameters, and the whole Model bit threw me, but this worked for me (note Square bracket)
@Model.MacroParameters["Image"]
Hopefully anyone else reading this, saves them a few mins.
Thanks
Stephen
Fantastic!
is working on a reply...