Sites Web : SPIP commits - by tech-nova

Publié le lundi 21 avril 2008

⇒ http://my.opera.com/tech-nova/blog/

Un site qui recense les astuces et évolutions des possibilités de SPIP.

Howto avoid the automatic compression of your scripts ?

Décembre 2008, par tech-nova

SPIP is fantastic because it can automatically merge and compress the css and javascript files.

But sometimes it can crash our scripts (especially if some parameters are stored inside). To solve it, just change, in your template, the type of your script. Instead of « text/javascript » use « application/javascript »

<br><code class="echappe-js">&lt;script type="application/javascript"&gt;'.$gmap_script.'&lt;/script&gt;
&lt;script type="application/javascript" src="'._DIR_PLUGIN_GEOMAP.'js/customControls.js"&gt;&lt;/script&gt;’ ;

→ Lire la suite sur le site d’origine…


Revenir en haut