Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am getting the following error while i am setting up the background image for my website banner.
The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(System.Collections.Generic.IEnumerable
Hi Chinny and welcome to our :)
Try to use this snippet of code, then you should see a background image on your div.
@{ if(home.HasValue("backgroundImage")){ var mediaItem = Umbraco.TypedMedia(home.GetPropertyValue("backgroundImage")); <div class="container-fluid logodiv radial-center" style="width:100%; height:100%;">test</div> <style> .logodiv{ background:url(@mediaItem.GetPropertyValue("umbracoFile")) no-repeat; } </style> } }
Be aware that the div is only shows when you have picked a picture in the media picker. Is what the the .HasValue does, only show the markup when there is a picture picked in the picker.
Hope this helps,
/Dennis
Thank you Dennis :)
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.
Continue discussion
The call is ambiguous between the following methods or properties,How to resolve?
I am getting the following error while i am setting up the background image for my website banner.
The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(System.Collections.Generic.IEnumerable
Hi Chinny and welcome to our :)
Try to use this snippet of code, then you should see a background image on your div.
Be aware that the div is only shows when you have picked a picture in the media picker. Is what the the .HasValue does, only show the markup when there is a picture picked in the picker.
Hope this helps,
/Dennis
Thank you Dennis :)
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.