# Content

org.openoffice.da.writer2xhtml.oxt/Configuration/Template.xhp
Template
Use this page to define an XHTML template to use as a basis for the generated XHTML documents.
Choose Tools - Options - Writer2xhtml - Template
Use custom XHTML template
Check this if you want to define an XHTML template. Otherwise a default template will be used.
A template should be an ordinary XHTML file (do not include a DOCTYPE declaration) with some special elements:
- A div-element with the id content is used to fill the text content. If no such element exists, the body element is used. If there is no body element in the template, the root element is used.
- div
  -elements with the id header or footer (optional) will be filled with a simple navigation panel using a first/previous/next/last scheme (for spreadsheet documents, sheet names are used for navigation).
- A div-element with the id panel (optional) will be filled with a simple navigation panel using a table of contens-like scheme.
You can change the names of the id attributes at the bottom of this page.
A simple template including a header might look like this:
<html>
<head>
<title/>
</head>
<body>
<div id='header' />
<div id='content' />
</body>
</html>
As the template does not include footer and panel nodes, these elements will not be included.
The absolute mininal template is this:
<div/>
The div-element will be used as the content container. The generated document will not be a complete XHTML document (no html, head and body nodes). It will however still be a well-formed XML file that can be handled with standard tools. The use case for this is that you can produce XHTML fragments suitable for inclusion in e.g. a CMS.
Make sure to check the option Do not include DOCTYPE in this case!
Load...
Click this to load a template from a file. This will overwrite the current contents of the template.
Content id
Enter the id to use for the content node.
Panel id
Enter the id to use for the panel node.
Header id
Enter the id to use for the header node.
Footer id
Enter the id to use for the footer node.