Hello, I am new to Umbraco (cloud) and I am trying to create a carousel slider in my website.
I created a document type called Slider Image which contains a single Image Media Picker property (alias:innerImage).
In Content I created three Slider Image Items under Homepage (all have uploaded images).
I created a Partial View called Main Slider where I put the Razor and HTML markup
Finally I inserted the Partial View into my Homepage template (line 83).
My problem is that I cannot access the innerImage url. I can access the Slider Image Item's name and url but not its property. Any insight would be welcome.
First thing I can recommend is to add a Mediapicker with 1-3 images in the configuration on the document type you want to put the slider. Else you'll pollute your content tree with nodes that aren't actually pages. (Even better is to use a composition, but that might be a bit farfetched for now ;-))
So for example on your Blog you'll add a MediaPicker which can select 1-3 images.
This way you can easily group your content.
Then on the blog partial view you can loop through each file in the picker (as in Huw's post).
Umbraco Carousel
Hello, I am new to Umbraco (cloud) and I am trying to create a carousel slider in my website.
I created a document type called Slider Image which contains a single Image Media Picker property (alias:innerImage).
In Content I created three Slider Image Items under Homepage (all have uploaded images).
I created a Partial View called Main Slider where I put the Razor and HTML markup
Finally I inserted the Partial View into my Homepage template (line 83).
My problem is that I cannot access the innerImage url. I can access the Slider Image Item's name and url but not its property. Any insight would be welcome.
you are using item.Url() which is the url of the slider Image node.
you need to get the InnerImage property of Slider Image, so try something like this to get the inner image
First thing I can recommend is to add a Mediapicker with 1-3 images in the configuration on the document type you want to put the slider. Else you'll pollute your content tree with nodes that aren't actually pages. (Even better is to use a composition, but that might be a bit farfetched for now ;-))
So for example on your Blog you'll add a MediaPicker which can select 1-3 images.
This way you can easily group your content.
Then on the blog partial view you can loop through each file in the picker (as in Huw's post).
is working on a reply...