1. Nivo-Slider herunterladen. http://nivo.dev7studios.com/ - entpacken
2. Die Datei "jquery.nivo.slider.js" nach /templates/DeinTemplate/javascript/ kopieren.
3. Die Datei "nivo-slider.css" /templates/DeinTemplate/css/ kopieren.
4. Den Inhalt des Ordner "themes" (die 4 Templateordner) nach /templates/DeinTemplate/css/nivo-slider/ kopieren (den Ordner nivo-slider vorher anlegen).
5. Den Inhalt des Ordners demo/images nach /templates/DeinTemplate/img/nivo-slider/ kopieren (den Ordner nivo-slider vorher anlegen).
6. Die Datei /templates/DeinTemplate/javascript/slidernivo.js mit einem Editor erstellen und folgendes einfügen:
Code: Alles auswählen
$(window).load(function() {
$('#slider').nivoSlider({
effect: 'random', // Specify sets like: 'fold,fade,sliceDown'
slices: 15, // For slice animations
boxCols: 8, // For box animations
boxRows: 4, // For box animations
animSpeed: 500, // Slide transition speed
pauseTime: 3000, // How long each slide will show
startSlide: 0, // Set starting Slide (0 index)
directionNav: true, // Next & Prev navigation
controlNav: true, // 1,2,3... navigation
controlNavThumbs: false, // Use thumbnails for Control Nav
pauseOnHover: true, // Stop animation while hovering
manualAdvance: false, // Force manual transitions
prevText: 'Prev', // Prev directionNav text
nextText: 'Next', // Next directionNav text
randomStart: false, // Start on a random slide
beforeChange: function(){}, // Triggers before a slide transition
afterChange: function(){}, // Triggers after a slide transition
slideshowEnd: function(){}, // Triggers after all slides have been shown
lastSlide: function(){}, // Triggers when last slide is shown
afterLoad: function(){} // Triggers when slider has loaded
});
});
</script>
Code: Alles auswählen
'css/nivo-slider/default/default.css',
'css/nivo-slider/light/light.css',
'css/nivo-slider/dark/dark.css',
'css/nivo-slider/bar/bar.css',
'css/nivo-slider.css'
Code: Alles auswählen
'javascript/jquery.nivo.slider.js',
'javascript/slidernivo.js'
Code: Alles auswählen
{if strstr ($smarty.server.PHP_SELF, 'index')}
{if $smarty.get.cPath==null and $smarty.get.manufacturers_id==''}
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<img src="{$tpl_path}img/nivo-slider/toystory.jpg" alt="" />
<a href="http://dev7studios.com"><img src="{$tpl_path}img/up.jpg" alt="" title="This is an example of a caption" /></a>
<img src="{$tpl_path}img/nivo-slider/walle.jpg" alt="" data-transition="slideInLeft" />
<img src="{$tpl_path}img/nivo-slider/nemo.jpg" alt="" title="#htmlcaption" />
</div>
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>
{/if}
{/if}
Der Slider funktioniert bei mir soweit einwandfrei.