• danielbala
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies

Is it possible to override the doctype that is generated automatically for pages?  It's currently HTML 4.01 , and we'd like to use XHTML 1.0 STRICT or Transitional (you are not supposed to use self closing tags in HTML 4.01).

 

We'd also like to be able to override/add to the HEAD tag.  There is currently what I consider a bug in the platform where if you use showHeader="false" in the apex:page tag, the title attribute of the apex:page tag is basically ignored.  We'd like to add the title back in without causing any other site validation issues.

 

I've also noticed an inconsistency with the syntax used for the generated HTML tags.

 

If you use apex:styleSheet , the items are generated with self closing tags, whereas the Salesforce included Ajax script and apex:includeScript use a full closing tag.

 

 

<html> <head> [no title, but I used the title attribute in apex:page] <script src="/faces/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.AjaxScript" type="text/javascript"></script> <script src="/support/resource/1248295072000/SelfService/jquery-1.3.2.min.js" type="text/javascript"></script> <link class="user" href="/support/resource/1248295072000/SelfService/survey.css" rel="stylesheet" type="text/css" /> </head>

 

 Also, what Visualforce tag(s) should we be using to ensure the document is wrapped in a <body> tag?  Or is that something we are expected to insert ourselves?

 

Thanks!

 

I have some questions/issues with how Visualforce renders the final HTML to the browser. My apologies if any of these have already been discussed. Please let me know if any of these are my problem or a bug. Here goes:

  1. I get duplicate DOCTYPE definitions when I use apex:include. It appears that the included page renders a new DOCTYPE reference at its position in the page.
  2. The <body> tag is not supplied when sidebar="false" and showHeader="false" in the apex:page attributes.
  3. I understand the purpose behind rendering <span> tags for all components, but it would be really nice to optionally restrict this. The added tags throw off the DOM and make things generally ugly. For example, if I want to inject a jQuery control (or the like), there's a risk that the control won't work due to the added tags, and I have no control over their display.