Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By soupp on
Hello
I want to implement a dirty trick for top DHTML navigation menu, which can be modified by uploading some js/html code. I'm not a programmer so I don't feel like I can wite a module for this menu manipulation which would be the right way of course.
So can I load to theme (for output to html) some code from external file? I use modified Chameleon theme.
Thanks
Comments
Edit your theme
Add a link to the <head> of your chameleon.theme file, in
function chameleon_page()
:<script src="path-to-file/file.js" type="text/javascript"></script>
I use the /misc directory to house this sort of stuff if it's to be used site-wide, else I use the theme directory. Really, you can put it anywhere your web server can see it...
/marky
Yup. Thaks.
Thanks Marky!
Quite a simple! But still: if I want to add some html (div's and so) code to page header from external file on the fly. How can I do this?