Expanding sections display text and other content – as much as you like – when the user clicks on the header. There are no restrictions on the content of expanding sections. You can insert anything that you can use in normal topics, including other expanding sections and snippets.
Avoid using additional tables inside your expanding section toggles if you also plan to publish to PDF or printed manuals. If you do, page breaks may not work correctly inside the rows containing additional tables. |
Expanding sections are handled by placing all the text and other content you want to include in the section in a single-cell table. Normally, this table will be created automatically by the Toggle function but you can also use an existing table if you want (see further below). 1.Click in your topic in the place where you want to insert an expanding section toggle. If you want to use existing text as the expanding section header, select it in the editor. 2.Select the Insert Toggle tool ![]() 3.Configure the settings in the Insert Toggle dialog and then click on OK to insert the toggle. This will create the toggle header with an empty, single-cell table below it. ![]() 4.Enter or copy the text and other content you want to include in your expanding section in the table. See further below for details on using existing text for expanding sections and expanding existing tables. You can have a maximum of one empty paragraph between the expanding section header and its table. If you have two or more empty paragraphs the expanding section will not work! 5.Format the header of your expanding section if you want. You can also use styles on the header paragraph, but you should switch off the "blue underlined" link style in the toggle settings when you do this. See below for more details. You can adjust the left and right indents of the toggle table by formatting the paragraph containing the table. See below for details. |
Normally, the Toggle Tool will automatically create an empty, single-cell table together with your expanding section header when you create the toggle. However, you can also toggle an existing table. To do this just follow the instructions above to create a toggle directly above the table you want to "toggle". In the Toggle a Table: setting select the option Toggle the table below this link. This option will only be displayed if there is actually a table below the paragraph where you are creating the toggle! When you toggle an existing table you may need to adjust the indents of the toggle and the table. See further below on this page for instructions. Toggling existing tables with IDs:Toggle links know which table to toggle by referencing the ID of the table, which is assigned automatically when you publish your output. If you have already assigned an ID to your existing table this ID will be overwritten by the toggle ID. If you want the table to keep its ID you must enter this ID as the toggle ID in the Insert Toggle dialog. Then it will still be overwritten, but with the correct ID. |
By default, the header (caption) of your expanding section either uses the standard hyperlink format or plain formattable text, depending on whether the Link Style option is selected in the Insert Toggle dialog. Using manual formatting and styles:If you deselect the Link Style option the header initially has the same style as the paragraph in which it is located. You can then apply manual formatting or use a style to format it. •To use manual formatting select the entire toggle header and use the font formatting tools in the Write tab. You must format the entire toggle header in exactly the same way, otherwise you will have breaks in the toggle link. •To use a style just click in the toggle header and select the style you want to use in the Style Selector in Write > Font. Using CSS styles in HTML-based output:Help+Manual exports individual CSS classes for all three toggle types. (The class dropdown-toggle is assigned to the toggle headers of expanding sections.) This means that you can define CSS styles in your HTML template to control both the appearance and behaviour of your toggle links. See Formatting toggle links topic for details. Note that CSS formatting only works on links when the Link Style option is selected in the Insert Toggle dialog! Otherwise you must format the toggle link manually or with a style (see above). |
When you create the expanding section table together with its toggle both are automatically given the same indent. Normally this will be fine and will not need to be changed. However, you may want to use a different indent and if you are using a toggle with an existing table you will probably need to make some adjustments. Adjusting the indent of the toggle header:The expanding section toggle header is a normal paragraph with a hanging indent for the toggle icon (if you are using one). Just click anywhere in the toggle and adjust the indent settings as you would for any other paragraph. You can also use a paragraph style to apply the desired indents to the toggle header. Adjusting the indent of the toggle table:The table containing the expanding text for the toggle is a normal table. Like any other table, it is effectively a single object in a paragraph that cannot contain any other objects. To adjust the indent of this table you need to adjust the indent settings of the paragraph containing the table. This too can be done with manual formatting or with a style. See Indenting tables for detailed instructions on how to do this. |
You can also use your own icons in your toggle headers. Just select Custom Icons in the Icon: field when you are defining or editing your toggle. Then select your icon files for the Collapsed: and Expanded: icon states in the fields directly below. •You will probably have to adjust the indents of your toggle and its table manually when you use your own icons (see above). |
When expanding text toggles are expanded in print-style output (PDF, DOCX, eBooks, printed manuals) the icon may not be suitable or desirable. You can remove the icon in these outputs by selecting the Remove icon when printing option. Alternatively, you can choose a different icon for these outputs by selecting the Custom Icons option and choosing an additional icon in the Print: field. |
When you choose one of the standard icon pairs for an expanding text toggle, Help+Manual first looks in your project folder to see if the necessary graphics files are there. If they are not there, it will write copies of the files to your project folder from its internal database. This means that if you store icons of your own in your project folder using these names they will be used instead of the standard icons. You can also "swap" the open and closed state icons around by renaming the icon files in your project folder. To replace the standard icon pairs with your own icons:Just give your icons the names of the standard icon pairs (see below) and store them in your project folder. Help+Manual will not overwrite them and they will be used automatically when you select the corresponding standard icon option (Plus/Minus Symbol, Folder, Arrow).
|
See also: