[development] Ordering of javascript includes in $head tag
Nick Lewis
nick at smartcampaigns.com
Thu Jan 26 16:49:39 UTC 2006
Hi folks -- I'm currently coding a public theme that makes use of the
nifty corners technique to generate image free curved corners. However,
I've run into a *critical* problem. When I hardcode the additional
javascript inserts that are required into the html head, all possible
variations of ordering the $style, $head, and the hardcoded include
fail to work. The only way I've been able to get around this as of now
is by removing the head and style tags, and pasting this hardcoded mess
(includes in questions are on line 4,5):
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://www.telecommunity.us/tispa/" />
<style type="text/css" media="all">@import "misc/drupal.css";</style><style type="text/css" media="all">@import "modules/dashboard/dashboard.css";</style>
<script type="text/javascript" src="themes/curved_slate/nifty.js"></script>
<script type="text/javascript" src="themes/curved_slate/layout.js"></script>
<script type="text/javascript" src="misc/drupal.js"></script>
<script type="text/javascript" src="modules/event/event.js"></script><style type="text/css" media="all">@import "modules/graphstat/graphstat.css";</style>
<script type="text/javascript" src="misc/textarea.js"></script>
<script type="text/javascript" src="misc/collapse.js"></script>
<link rel="shortcut icon" href="misc/favicon.ico" type="image/x-icon" />
<style type="text/css" media="all">@import "themes/curved_slate/style.css";</style>
<style type="text/css" media="all">@import "modules/event/event.css";</style>
The two javascript includes apparently need to come before misc/drupal.js for the nifty corners technique to work. Any ideas on a cleaner
way to include the javascript in the right order without breaking module's ability to extend the template?
Best,
Nick Lewis
http://nicklewis.smartcampaigns.com
More information about the development
mailing list