I'm trying to update one of our older ZPT based applications and I would like to implement the following HTML5 Boilerplate best practice for adding conditional IE classes to the <html>
.
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
Since I've used this technique on many non-ZPT sites I didn't think too much about it, however when I went to implement it I ran into a few problems.
- ZPTs remove HTML comments so the rendered source lacks the conditional comments
- We're using a whole page macro to define a reusable page template and that definition occurs in the
<html>
element like so,<html metal:define-macro="page">
. Even once I get the conditional comments to display it seems that my next hurdle will be properly defining the page macro.
Can anyone shed some light on either of these questions?