Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

  • 4/7/2015
  • 9000 Views

Comments

9000 Views

Doctype

Last updated long time ago

Comments

Common

(Enter the content of this article below)

Advanced

 
In the context of web pages,the doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers can render the content follows the rules of that markup language i.e. different versions of the doctype render content in different ways.

In early versions of DotNetNuke the doctype was a fixed part of default.aspx and was set to "HTML 4.0 Transitional" which was not ideal for sites wanting to create valid XHTML markup. With 4.4, the declaration has been made dynamic, to allow users to declare particular doctypes with particular skins.

To make use of this, you create a file with the same name as your skin except ending in doctype.xml (rather than ascx/htm/html) and it’ll be picked up during skin load. This xml file should contain a single node,SkinDocType, that contains a declaration of your desired doctype. To ensure that the parser reads the value correctly, you need to use a CDATA section to escape out the various < and & characters e.g. If I have a skin called mypage.asx that I intended to render as XHTML 1.0 strict, then I would create a file called mypage.doctype.xml which would contain the following:

XHTML Strict

<SkinDocType><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">]]></SkinDocType>

XHTML Transitional

<SkinDocType><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">">]]></SkinDocType>

HTML 5

<SkinDocType><![CDATA[<!DOCTYPE html>]]></SkinDocType>

Contents
No sections defined
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out