HTML Templates

Questions and answers concerning HTML templates, styling, how to create auxiliary pages or customized content.


How can I dynamically toggle components to show/hide?

The pb-toggle-feature and pb-select-feature components can be used to toggle the state of selected elements or components on a page. Both emit a pb-toggle event if the selection changes, which is handled by pb-view and pb-load. There are two modes of operation as described in the webcomponent documentation for pb-toggle-feature: server side toggling: causes the receiving pb-view or pb-load to reload the currently displayed content, leaving it to the ODD to process the state changes client side toggling: applies state changes client side (i.
Read More…

Can I use a custom table of contents?

By default, the table of contents shown in TEI Publisher is generated per document. In some cases this does not make much sense, e.g. for an edition of letters without internal structure. Fortunately it is not too difficult to replace the code which generates the ToC with your own, assuming you have a basic understanding of XQuery. The following applies to TEI Publisher 7 (and all custom apps generated by it), which provides a clear structure for custom code like this.
Read More…

How can I add auxiliary pages to the edition?

A digital edition usually includes a number of auxiliary pages such as an introduction or “About this project” page. This can be done in a number of ways. The easiest is to write your text in an XML format already supported by Publisher like TEI or Docbook. Just save the document into your data directory (or a subdirectory) alongside the edition texts and give it a descriptive name like introduction.xml.
Read More…