1

Is it possible to modify the meta tag “http-equiv” in the local.xml? What I’m trying to achieve is rendering a tag on one page that reads: <meta http-equiv="X-UA-Compatible" content="IE=8" /> and on another page: <meta http-equiv="X-UA-Compatible" content="IE=9” />. Is it possible to do this, or will I have to write PHP logic in the head.phtml file to achieve this?

1
  • Please, how can change the position of this code? I would like to have it above the <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> and now it is under stylesheets and so on. So it doesn't work in IE. And what is the handler name of the first landing checkout page? I tried <checkout_onepage_index>...</checkout_onepage_index> but with this it doesn't work. Many thanks. Jul 28, 2016 at 15:29

1 Answer 1

1

There is no standard method to do this but you can use the core/text block. You can set a different value per layout handle

<[page_handle]>
   <reference name="head">
      <block type="core/text" name="ua-compatible">
         <action method="setText">
           <text><![CDATA[<meta http-equiv="X-UA-Compatible" content="IE=8" />]]></text>
         </action>
      </block>
   </reference>
</[page_handle]>

If the meta tag is already on the page edit the head.phtml to remove it first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.