Maintaining Template Meta-data
Since Percussion does not provide designers the ability to directly manipulate the HTML of template, template meta-data provides options for designers or administrators to insert additional code into the published website.
Template Meta-data includes:
- Additional Head Content: Content added to the <head> section of the HTML page, such as search engine optimization data. When generating the HTML page, additional code from the template is inserted before code from the page meta-data.
- Code inserted at the beginning of the HTML body of the generated pages (after the opening <body> tag but before other HTML code). For example, you could use this field to add a common header to all HTML pages generated using this template. When generating the HTML page, additional beginning body code from the template is added before additional code from page meta-data.
- Code inserted at the end of the HTML body of the generated pages (before the closing </body> but after all other HTML code). For example, you could use this field to add a common footer to all HTML pages generated using this template. When generating the HTML page, additional ending body code from the template is added after additional code from page meta-data.
This code is added to all HTML pages generated from Percussion pages that use the template. Additional HTML may also be included on each individual page. When generating the final HTML file, additional HTML code is added in the following pattern:
<head>
template head code
page head code
</head>
<body>
template beginning body code
page beginning body code
(body content)
page ending body code
template ending body code
</body>
Note: When inserting any server-side code within the code entry points on templates and pages, the code must be wrapped with HTML comments and contained within the Additional Head Content.
For example this is a block of ASP code:
<%
on error resume next
dim objSrvHTTP
dim objXMLSend
dim objXMLReceive
set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
set objXMLSend = Server.CreateObject("MSXML2.DOMDocument.4.0")
set objXMLReceive = Server.CreateObject("MSXML2.DOMDocument.4.0")
%>
This is a block of ASP code with HTML comments around it:
<!-- <%
on error resume next
dim objSrvHTTP
dim objXMLSend
dim objXMLReceive
set objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
set objXMLSend = Server.CreateObject("MSXML2.DOMDocument.4.0")
set objXMLReceive = Server.CreateObject("MSXML2.DOMDocument.4.0")
%>-->
Editing the DocType
Editing the template meta-data also provides the ability to edit the DocType of the HTML pages Percussion renders. By default, the recommended HTML 5 doctype is selected.
You can select another doctype or select the Custom option to enter a doctype.
Sample DocType Declarations:
HTML 5
<!DOCTYPE html>
<html lang="en" xml:lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:perc="http://percussion.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
HTML 4.01 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
XHTML 1.0 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
XHTML 1.0 Transitional
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
XHTML 1.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">