Closed (won't fix)
Project:
HTML5 Base
Version:
6.x-1.0-beta1
Component:
Markup
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2010 at 00:24 UTC
Updated:
9 Jul 2011 at 18:46 UTC
Jump to comment: Most recent file
Comments
Comment #1
jensimmons commentedSo — I'm going to implement this in page.tpl, so that it can be conditional, and only load for IE.
<!--[if IE]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->Right now, I'm going to make it link to the file on googlecode. This:
1) keeps a 3rd party thingy out of Drupal CVS;
2) allows themes to get an update automatically if Remy Sharp every updates that code.
-OR-
We can instead include the js file ourselves. That's what Boron does. (http://drupal.org/project/boron)
Thoughts?
I'm going to commit the 1st solution (so that it works). Let's discuss and we can change it if we decide we want the second option.
Comment #2
jensimmons commentedI switched the call to this:
Comment #3
jensimmons commentedI did this. Review.
Comment #4
seutje commentednot very cool to hardcode this in the page.tpl.php :(
Comment #5
mason@thecodingdesigner.com commentedAgree on the hardcoded conditional comments. Here's a patch that adds a conditional comments function to template.php.
Comment #6
jensimmons commentedWell, in D6, all the other if IE stylesheets have to be hardcoded into the page.tpl. (Oh, actually in D7 too since the PHP coders beat the front-end developers in the debate, and refused to put conditional stylesheets into core. :( Really IE stylesheets should be defined in the .info file. #522006: Conditional Styles in .info files, since drupal_add_css has it) So I don't see how doing this one in that way is any different.
If it's in the template.php, it's harder for people to figure out where it's coming from. This is not the most-used technique for conditional IE stylesheets.
Comment #7
seutje commentedyea, but no way ur getting that backported to 6, it's an obvious feature.
u could make like Zen and carry the code for it around yourself -> http://drupalcode.org/viewvc/drupal/contributions/themes/zen/zen/templat... (this is for css, but js would work exactly the same), then u can happily put it in the .info and then subthemes can swap it out if they want without being forced to override the whole tpl.php
Comment #8
jensimmons commentedI'm not advocating we add Conditional Stylesheets to D6. :P
I'm saying that I don't want to hide the inclusion of the conditional HTML5 IE .css in the template preprocess. I'd prefer to just print it in the page.tpl like all other conditional css.
Oh, wait. This is about .js.
#jetlag
Comment #9
mbavio commentedHey, this is my first comment here, it's just a question to jenny: why not to do as zen does (seutje already adviced that) so you can include the conditional js and css from the .info file. Seems like the best "drupal" way of doing this...
Comment #10
spaceninja commentedI'll second this request - I was looking to copy that code for Boron, as well. Does anyone know of a reason we shouldn't do this?
Comment #11
jensimmons commentedWho is "jenny"?
Comment #12
alanburke commentedAny thoughts on using Modernizr as suggested by HTML5 boilerplate?
This includes the HTML shiv for IE.
Comment #13
mbavio commentedSorry, my question was for @jensimmons. Dont know why I wrote Jenny :P
Comment #14
mason@thecodingdesigner.com commentedI like and use Modernizr, but I don't think it's essential to this theme.
Comment #15
jensimmons commented