Cclientscript::pos_Begin And Conditionnal Comment On Body

Hi,

In some application, i can’t update HEAD, then to have conditionnal css for browser, i do it in body:


<!--[if lt IE 7 ]> <body class="ie ie6 ielt7 ielt8 ielt9 no-js"><![endif]-->

<!--[if IE 7 ]> <body class="ie ie7 ielt8 ielt9 no-js"> <![endif]-->

<!--[if IE 8 ]> <body class="ie ie8ielt9  no-js"> <![endif]-->

<!--[if IE 9 ]> <body class="ie ie9 no-js"> <![endif]-->

<!--[if gt IE 9]><!--><body id="body" class="no-js"><!--<![endif]-->

(I know it’s better to have it in head, no comment here please ;) ).

But if i use


getClientScript()->registerScriptFile('script.js',CClientScript::POS_BEGIN);

The script is added after the first body:


<!--[if lt IE 7 ]> <body class="ie ie6 ielt7 ielt8 ielt9 no-js"><script type="text/javascript" src="script.js"></script>

 <![endif]-->

<!--[if IE 7 ]> <body class="ie ie7 ielt8 ielt9 no-js"> <![endif]-->

<!--[if IE 8 ]> <body class="ie ie8ielt9  no-js"> <![endif]-->

<!--[if IE 9 ]> <body class="ie ie9 no-js"> <![endif]-->

<!--[if gt IE 9]><!--><body id="body" class="no-js"><!--<![endif]-->

Putting with POS_END is ok actually, but i like to have it before staring the body but after all other script.

Thanks for the tips :)

Denis