WebDevAE Posted January 12, 2015 Share Posted January 12, 2015 Bonjour à tous, Je dois mettre un slider en JS dans mon header.tpl pour qu'il apparaisse en haut de page, mais j'ai une erreur 500 (internal server error) dès que j'ajoute le script. (http://imgur.com/7LsB0ud). Voici le code (entre -------------------------------) : <body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{/if}{if $hide_right_column} hide-right-column{/if}{if isset($content_only) && $content_only} content_only{/if} lang_{$lang_iso}"> {if !isset($content_only) || !$content_only} {if isset($restricted_country_mode) && $restricted_country_mode} <div id="restricted-country"> <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country|escape:'html':'UTF-8'}</span></p> </div> {/if} <div id="page"> <div class="header-container"> <header id="header"> <div class="banner"> <div class="container"> <div class="row"> {hook h="displayBanner"} </div> </div> </div> <div class="nav"> <div class="container"> <div class="row"> <nav>{hook h="displayNav"}</nav> </div> </div> </div> <div> <div class="container"> <div class="row"> <div id="header_logo"> <a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}"> <img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/> </a> </div> {if isset($HOOK_TOP)}{$HOOK_TOP}{/if} </div> </div> </div> --------------------------------------------------------------------------------------- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=Edge"/> <!--Adobe Edge Runtime--> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <script type="text/javascript" charset="utf-8" src="http://animate.adobe.com/runtime/5.0.1/edge.5.0.1.min.js"></script> <style> .edgeLoad-EDGE-4760735 { visibility:hidden; } </style> <script> AdobeEdge.loadComposition('slide1', 'EDGE-4760735', { scaleToFit: "width", centerStage: "both", minW: "990px", maxW: "undefined", width: "1280px", height: "445px" }, {"dom":{[spam-filter], {"style":{"${symbolSelector}":{"isStage":"true","rect":["undefined","undefined","1280px","445px"],"fill":["rgba(255,255,255,1)"][spam-filter],"dom":{[spam-filter]); </script> <!--Adobe Edge Runtime End--> <div id="Stage" class="EDGE-4760735"> </div> --------------------------------------------------------------------------------------- </div> </header> Et lorsque j'enlève le code ci-dessous, je n'ai plus d'erreur (http://imgur.com/4SbRrFX) : <script> AdobeEdge.loadComposition('slide1', 'EDGE-4760735', { scaleToFit: "width", centerStage: "both", minW: "990px", maxW: "undefined", width: "1280px", height: "445px" }, {"dom":{[spam-filter], {"style":{"${symbolSelector}":{"isStage":"true","rect":["undefined","undefined","1280px","445px"],"fill":["rgba(255,255,255,1)"][spam-filter],"dom":{[spam-filter]); </script> Je tiens aussi à rajouter que lorsque j'essaie de faire apparaître une fenêtre modale avec un script simple, cela fonctionne. <script>alert("Test");</script> Je souhaiterai donc savoir si quelqu'un saurait comment je dois procéder pour que mon code fonctionne. Merci d'avance pour vos réponses ! Link to comment Share on other sites More sharing options...
J. Danse Posted January 12, 2015 Share Posted January 12, 2015 (edited) Bonjour, <script> {literal} ... {/literal} </script> Il vous faut baliser de {literal}{/literal} pour que les accolades ne soient pas interprétés comme balise Smarty. Edited January 12, 2015 by J. Danse (see edit history) Link to comment Share on other sites More sharing options...
WebDevAE Posted January 12, 2015 Author Share Posted January 12, 2015 Bonjour, <script> {literal} ... {/literal} </script> Il vous faut baliser de {literal}{/literal} pour que les accolades ne soient pas interprétés comme balise Smarty. MERCI !! Je devenais fou avec cette erreur 500 ! 1 Link to comment Share on other sites More sharing options...
J. Danse Posted January 12, 2015 Share Posted January 12, 2015 Avec plaisir, (pas que vous deveniez fou ). N'hésitez pas à éditer votre premier message et éditer le sujet en [Resolu] xxx. 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