1

There are only two options to specify the DOCTYPE of the page, HTML5 or XHTML 1.0, in site.com but no option to add HTML tag based IE Condition.

for e.g, I want to add different html DOCTYPE based on IE

<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->

<!--[if lt IE 7]><html class="lt-ie9 lt-ie8 lt-ie7" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><![endif]-->
<!--[if IE 7]><html class="lt-ie9 lt-ie8" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><![endif]-->
<!--[if IE 8]><html class="lt-ie9" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html xmlns="http://www.w3.org/1999/xhtml"><!--<![endif]-->

Can anybody help how to add these comments tags in "page-templates" in site.com.

2 Answers 2

1

Solved it!

Updated the html element class names using script tags by editing heading area in all page-templates.

 <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
      <meta charset="utf-8">
      <!--[if lt IE 7 ]> <script>document.documentElement.className+=' ie6';</script> <![endif]-->
      <!--[if IE 7 ]>    <script>document.documentElement.className+=' ie7';</script> <![endif]-->
      <!--[if IE 8 ]>    <script>document.documentElement.className+=' ie8';</script> <![endif]-->
 </head>
1
0

There is a provision by Salesforce to allow this.

Check out the following. It is a snippet from a page that does this no problem and results in clean markup. The key thing to note is the applyHtmlTag attribute. If you set this to false then you take full control of the html tag, and also the head tags.

Trust this helps.

<apex:page showHeader="false" applyHtmlTag="false" sidebar="false"  docType="html-5.0" standardStylesheets="false" controller="mypagecontroller">
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>...</head></html>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .