#### 18.4.3 Adding expandable sections to HTML Help

The HTML Help Workshop help file explains how to add the required HTML and JavaScript code for expanding sections. With DITA2Go macros you can automate insertion of this code in the output.

For example, suppose you want to use a link:

    Click for more

which, when clicked, displays additional text:

    Here is a more detailed explanation.

You could apply a special paragraph format to the link text (for example, ClickLink) and another format to the expandable text (for example, ClickText). In your configuration file you would include macros that contain the required HTML code for each paragraph type. If the link text was always the same, you could include that in the macro too, and just have the text for the expanded part in DITA XML. Or, you could use a button (see §18.7.6 Creating buttons for other types of related-topic links).

Previous Topic: 18.4.2 Adding tabs and toolbar buttons to HTML Help

Next Topic: 18.5 Creating pop-ups for HTML Help

Parent Topic: 18.4 Customizing HTML Help display features

Sibling Topics:

18.4.1 Using CSS and font tags with HTML Help

18.4.2 Adding tabs and toolbar buttons to HTML Help