content:en_us:dev_theming_document_type

Table of Contents

Theming Document Type

The document type declaration is required for your theme. This is certainly one of the easiest steps in creating a theme!

Hook

The theme engine loads the core/doctype.php file in your theme directory and expects to find the theme_page_doctype hook defined. Your hook should return the doctype string.

Examples

The following returns the old 4.01 transitional doctype.

function theme_page_doctype()
{
    return "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n";
}

A more modern HTML 5 example:

function theme_page_doctype()
{
    return "<!DOCTYPE html>\n";
}

search?q=clearos%2C%20clearos%20content%2C%20dev%2C%20theming%2C%20maintainer_dloper&amp;btnI=lucky

content/en_us/dev_theming_document_type.txt · Last modified: 2015/03/02 17:05 by dloper