Hi Fmuhlen,
die Dateien für den NivoSlider müssen so in der _header.tpl eingefügt werden:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html[{if $oView->getActiveLangAbbr()}] lang="[{ $oView->getActiveLangAbbr() }]"[{/if}] [{if $oViewConf->getFbAppId()}]xmlns:fb="http://www.facebook.com/2008/fbml"[{/if}]>
<head>
[{assign var="_titlesuffix" value=$_titlesuffix|default:$oView->getTitleSuffix()}]
[{assign var="_titleprefix" value=$_titleprefix|default:$oView->getTitlePrefix() }]
[{assign var="title" value=$title|default:$oView->getTitle() }]
<title>[{ $_titleprefix }][{if $title&& $_titleprefix }] | [{/if}][{$title|strip_tags}][{if $_titlesuffix}] | [{$_titlesuffix}][{/if}][{if $titlepagesuffix}] | [{$titlepagesuffix}][{/if}]</title>
<meta http-equiv="Content-Type" content="text/html; charset=[{$charset}]">
[{if $oView->noIndex() == 1 }]
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
[{elseif $oView->noIndex() == 2 }]
<meta name="ROBOTS" content="NOINDEX, FOLLOW">
[{/if}]
[{if $oView->getMetaDescription()}]<meta name="description" content="[{$oView->getMetaDescription()}]">[{/if}]
[{if $oView->getMetaKeywords()}]<meta name="keywords" content="[{$oView->getMetaKeywords()}]">[{/if}]
[{assign var="canonical_url" value=$oView->getCanonicalUrl()}]
[{if $canonical_url }]<link rel="canonical" href="[{ $canonical_url }]">[{/if}]
<link rel="shortcut icon" href="[{ $oViewConf->getBaseDir() }]favicon.ico">
<link rel="stylesheet" type="text/css" href="[{ $oViewConf->getResourceUrl() }]oxid.css">
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="[{ $oViewConf->getResourceUrl() }]ie7.css"><![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" href="[{ $oViewConf->getResourceUrl() }]ie8.css"><![endif]-->
<script src="[{ $oViewConf->getResourceUrl() }]jquery.js" type="text/javascript"></script>
<script src="[{ $oViewConf->getResourceUrl() }]nivoslider.js" type="text/javascript"></script>
<script src="[{ $oViewConf->getResourceUrl() }]myinits.js" type="text/javascript"></script>
Und in einem extra Javascript, welches ebenfalls noch im Header eingebunden werden muss, die Initialisierung des Sliders aka:
(myinits.js)
$(document).ready(function()
{
/* init Events in content */
var thisParent = thisParent || $("body");
initEvents(thisParent);
});
/* Init basic events and effects */
function initEvents(thisParent)
{
initNivoSlider();
}
function initNivoSlider(){
$('#slider').nivoSlider({
effect: 'random',
slices: 15,
animSpeed: 1000,
pauseTime: 4000,
startSlide: 0, //Set starting Slide (0 index)
directionNav: false, //Next & Prev
directionNavHide: false, //Only show on hover
controlNav: false, //1,2,3...
controlNavThumbs: false, //Use thumbnails for Control Nav
controlNavThumbsSearch: '.jpg', //Replace this with...
controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
keyboardNav: false, //Use left & right arrows
pauseOnHover: false, //Stop animation while hovering
manualAdvance: false, //Force manual transitions
captionOpacity: 0.8, //Universal caption opacity
beforeChange: function(){},
afterChange: function(){},
slideshowEnd: function(){} //Triggers after all slides have been shown
});
}
Dann noch ein DIV, da wo der Slider ausgegeben werden soll:
<div id="slider">
[{oxifcontent ident="oxslideshow" object="oCont"}]
[{$oCont->oxcontents__oxcontent->value}]
[{/oxifcontent}]
</div>
Dann noch eine neue CMS Seite anlegen mit der ID oxslideshow und dort Bilder reinklatschen, die geslided werden sollen.
Viele Grüße vom Chris