Gwendall Posted May 17, 2011 Share Posted May 17, 2011 Bonjour à tous.J'essaie de mettre en place un slideshow sur ma page d'accueil.J'ai trouvé celui de PrestaScope qui correspond plus ou moins à ce que je désire obtenir.Je l'ai donc pris comme base et décidé d'y apporter quelques modifs.Côté back-office, il est parfait.Côté front office, je souhaite obtenir ceci.J'ai donc effectué mes modifs.Tout fonctionne parfaitement si j'utilise le script de base : [removed] $(window).load(function() { $('#slider').nivoSlider(); }); [removed] Mais lorsque j'essaie de rajouter une option : [removed] $(window).load(function() { $('#slider').nivoSlider( {effect:'fade'} ); }); [removed] Ca plante...Message d'erreur : Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/Applications/MAMP/htdocs/effetmer/modules/pss_slideshow/animation.tpl" on line 6 "{effect:'fade'}" - Unexpected ":", expected one of: "}" , " "' in /Applications/MAMP/htdocs/effetmer/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 /Applications/MAMP/htdocs/effetmer/tools/smarty/sysplugins/smarty_internal_templateparser.php(2855): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /Applications/MAMP/htdocs/effetmer/tools/smarty/sysplugins/smarty_internal_templateparser.php(2920): Smarty_Internal_Templateparser->yy_syntax_error(2, ':') #2 /Applications/MAMP/htdocs/effetmer/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(51): Smarty_Internal_Templateparser->doParse(2, ':') #3 /Applications/MAMP/htdocs/effetmer/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(82): Smarty_Internal_SmartyTemplateCompiler->doCompile('<!-- Block anim...') #4 /Ap in /Applications/MAMP/htdocs/effetmer/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431Je suis en local pour l'instant.Est-ce que quelqu'un a une idée ? Link to comment Share on other sites More sharing options...
Captain FLAM Posted November 18, 2011 Share Posted November 18, 2011 Il existe un module ... une petite recherche Pour ton problème, il te faut encadrer ton code par la balise smarty {LITERAL} sinon, dans le TPL de ce module, voilà ce qu'il y a : $(window).load(function() { $('#slider').nivoSlider({ effect:'random', //Specify sets like: 'fold,fade,sliceDown' slices:9, animSpeed:500, //Slide transition speed pauseTime:3500, startSlide:0, //Set starting Slide (0 index) directionNav:true, //Next & Prev directionNavHide:true, //Only show on hover controlNav:true, //1,2,3... controlNavThumbs:false, //Use thumbnails for Control Nav controlNavThumbsFromRel:false, //Use image rel for thumbs controlNavThumbsSearch: '.jpg', //Replace this with... controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src keyboardNav:true, //Use left & right arrows pauseOnHover:true, //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 }); }); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now