I am not using Image Cropper, though it looks quite interesting! I will play around with that.
So I tried your solution and it seemed to work for 1 child template of Master but it will not work on my master template at all. It starts throwing odd messages at me and not liking other @Umbraco declarations at me like:
Server Error in '/' Application.
The value of parameter 'id' must be either a string or an integer
How to add images to website from Media Picker
How is this done?
I'm currently using the following method which does not display images for me:
@{ if(Model.Content.HasValue("sliderImage4")){ var mediaItem = Umbraco.TypedMedia(Model.Content.GetPropertyValue("sliderImage4")); <img src="@mediaItem.GetPropertyValue("umbracoFile")" alt="@mediaItem.GetPropertyValue("Name")"/>} }
Thanks,
Jon
Hi Jon
Are you by any chance using the image cropper? Then there is some documentation about how to do it here http://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Image-Cropper
Have you tried simply writing
@Umbraco.TypedMedia(Model.Content.GetPropertyValue("yourimagealias")).Url
/Jan
Hi Jan,
I am not using Image Cropper, though it looks quite interesting! I will play around with that.
So I tried your solution and it seemed to work for 1 child template of Master but it will not work on my master template at all. It starts throwing odd messages at me and not liking other @Umbraco declarations at me like:
Server Error in '/' Application.
The value of parameter 'id' must be either a string or an integer
@Umbraco.Field("slider1Header")
Not really sure why.
Thanks,
Jon
Hi Jon
Could you paste what the code from your masterpage please? :)
/Jan
Sure :)
Here is my slider code:
is working on a reply...