Themesremix Posted March 24, 2009 Share Posted March 24, 2009 Quelqu'un sait comment 'injecter' une balise script ou un link css dans le header de la page ? Je développe un module et j'aimerais que mon javascript et mon css soit inclus dans le header et non dans le body.merci pour vos réponses Link to comment Share on other sites More sharing options...
Patric Posted March 24, 2009 Share Posted March 24, 2009 Ta balise a été supprimée par le forum... 8-/ Tu devrais y insérer des espaces...EDIT : ha ben c'est corrigé... Link to comment Share on other sites More sharing options...
moncler Posted March 25, 2009 Share Posted March 25, 2009 Il te suffit de l installer dans le "hook_header" (dans la fonction instal: $this->registerHook('top')) et puis tu definit ta fonction hookTop qui display ton tpl fait pour le hooktop dans lequel tu inclueras tes fichier js ou css) Link to comment Share on other sites More sharing options...
Themesremix Posted March 25, 2009 Author Share Posted March 25, 2009 mais oui bien sur, merci ;-) Link to comment Share on other sites More sharing options...
Themesremix Posted July 12, 2009 Author Share Posted July 12, 2009 je reviens sur le sujet,la méthode de moncler fonctionne très bien sauf que , le fichier .tpl chargé dans l"entête <head></head> , se chargera sur toutes les pages du site , ce qui peut poser problème ... 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