Adding navigation to topics
In HTML5 output, you can set a parameter to include table-of-contents navigation in the
<nav>
element of each page. The navigation can be rendered in a sidebar or menu via
CSS.
About this task
Earlier versions of DITA-OT used the TocJS transformation to render a JavaScript-based table of contents in an XHTML frameset for topic navigation. Recent toolkit versions provide a modern HTML5 navigation alternative.
As of DITA-OT 2.2, the nav-toc parameter can be used in HTML5 transformations to embed navigation directly in topics using native HTML5 elements without JavaScript or framesets.
Procedure
Results
Tip: For an example of HTML output generated using this method, see the HTML5 version of the DITA-OT
documentation included in the installation folder under doc/index.html.