1.jpg is the name of my image. In the macro, I can only seem to add one image and not a folder. Also, obviously, something is going wrong in terms of the image filename = 1.jpg - being referenced as a div id.
It's not necessary to create a media type for this. You just need to output your images somehow on the page, then when you see that your macro works make it look nice with nivo slider.
Where am I going wrong?
Hello,
Using Umbraco 7.1.4 and trying to get NivoSlider to work.
This is what I have done...
- Created media type "NivoSliderImage"
- Added the properties "umbracoFile" (Upload), "umbracoWidth" (Label), and so on
- Created a media folder and uploaded some images into it
- Created a partial view and added the macro into it
- Referenced the partial vview in the template
So, this all seems to be OK. But there is no slideshow. It's in the HTML, like this:
<script type="text/javascript" src="/scripts/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="/scripts/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#1.jpg').nivoSlider({
effect:',
slices:0,
boxCols:1,
rowCols:4,
animSpeed:5,
pauseTime:null,
startSlide:null,
directionNav:true,
directionNavHide:false,
controlNav:true,
keyboardNav:true,
pauseOnHover:false,
manualAdvance:true,
captionOpacity:5,
prevText:'null',
nextText:'null'
});
});
</script>
<div id="1.jpg" class="nivoSlider">
</div>
1.jpg is the name of my image. In the macro, I can only seem to add one image and not a folder. Also, obviously, something is going wrong in terms of the image filename = 1.jpg - being referenced as a div id.
Hope that someone can help! :-)
Cheers,
Paul
It's not necessary to create a media type for this. You just need to output your images somehow on the page, then when you see that your macro works make it look nice with nivo slider.
At what stage do you have problems?
But... but...!
The documentation says "...you will have to create a required Media Type called ‘NivoSliderImage’ by yourself".
The only two things that are wrong are...
1. Can't pick more than one image in the macro
2. Slider not showing when page is published
Cheers,
Paul
No sure what you mean by "Can't pick more than one image in the macro"
Just add a multiple media picker on you content node in Umbraco, then start by outputting those images on the html page, e.g. as described here: http://www.cpodesign.com/blog/using-multiple-media-picker-in-umbaco-7/
When you actually see those images on the page apply your slider on top.
OK, so:
- Added new property "SliderImages" into Doctype "Home". It has the property "Multiple media picker" and I add it as a tab
- Under Content-> Home, the tab appears and I add images
- Add the Nivo Slider macro back into the Home template. Result on the front end: "Error loading MacroEngine script (file: NivoSlider.cshtml)"
- OK, so take it out and add the code from the CPODesign page. Result on the front end: Complete runtime error.
Help :-(
is working on a reply...