I've got a funny one! I've got two DAMP data types:
Large Image Picker
Small Image Picker
The crop name is different in each, obviously coresponding to a large and small crop. On some document type I use the small data type, on other I use the large one, however the property always has the same name. This way I can reference it in a single macro (razor).
The problem is that my macro doesnt know whether the user has selected a large image or a small image, so I cannot effectively use DAMP_Helper.GetImageCropperUrl because tis method requires the name of the crop.
Is there of way of getting the settings of the data type which in turn would give me access to the name of the crop which was defined when setting up the small/large data types? OR am I looking at this the wrong way - is there a different way this can be acheived? I could only think of adding the name of the crop to the document type, but this seems like an awful hack.
Getting DAMP Datatype settings in Razor!
Hi,
I've got a funny one! I've got two DAMP data types:
Hello,
I assume that if you place the macro on a template you know there what crop you want do display? In that case you could add an extra parameter to the macro (more info here and here) and pass that parameter to the DAMP helper. Also see this topic: http://our.umbraco.org/forum/developers/razor/19984-Razor-variable-property.
Jeroen
Remove double post.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.