If you have 2 different media types would that then not be enough to determine the zoom-factor? Could you perhaps describe the use case a bit more detailed? Currently there is no way of setting default values on media out of the box. That will require some interaction with the API.
That way you can hook into an event when one of the media types are created and then populate it with the desired value for the default zoom level.
Default Values for Media Type
Hi!
Need some help.
How I can set default value for media type field. For example:
I need create media type SomeMediaType with property ZoomFactor: 1
And media type AnotherMediaType with property ZoomFactor: 4
This property must be constant for this media type, and be available after first save.
Thanks!
Hi z4k
If you have 2 different media types would that then not be enough to determine the zoom-factor? Could you perhaps describe the use case a bit more detailed? Currently there is no way of setting default values on media out of the box. That will require some interaction with the API.
That way you can hook into an event when one of the media types are created and then populate it with the desired value for the default zoom level.
You can see a list of events here http://our.umbraco.org/documentation/Reference/Events/Document-Events (valid for v4)
And here you can read some more about using the API to manipulate media http://our.umbraco.org/documentation/Reference/Management/Media/
Hope this helps.
/Jan
is working on a reply...