Set an Accordion on an Imported Subsection Topic
If you create subsections by inserting a topic inside another topic, you can set the subsections to display as an accordion. There are two ways to do this:
Set the subsection topic to have
role:accordionon itssectionelement. This makes the topic display as an accordion wherever it is used (see Set an Accordion on a Section Element).Set the container topic to have
xlink:role=accordionon thexi:includeelement.This makes the subsection topic display as an accordion, but only when it is used as a subsection in this particular "parent" topic. If the subsection topic is also used elsewhere, it will not display as an accordion in those other locations (unless you set it up to have an accordion in those places too).
To edit the source code for the "parent" topic and make an imported subsection display as an accordion:
In the Content Manager, find the "parent" topic that contains the subsection ("child" topic). Select the "parent" topic to open it in the editor.
Click on the subsection ("child" topic) and then look in the Element Structure Menu at the top. Make sure that the subsection is represented by an
importelement in the structure of the topic.
A topic containing another topic as a subsection. The subsection topic has been inserted as a component and is shown as an import element.
If you do not see an
importelement, it is likely that the subsection has been created in another way. For example, added as asectionelement inside the "parent" topic. You can convert it into an inserted component by selecting itssectionelement and then choosing Convert to reusable component. Paligo will convert thesectioninto a separate topic and add animportelement in its place.Select the Import element in the Element Structure Menu and then select Go to element.
In the Element attributes panel, select the section element and choose the xi:include element instead.

Note
If your "parent" topic contains many imported subsections, it will have an
xi:includeelement for each one. They are shown in the order they appear in the "parent" topic. Make sure that you are looking at thexi:includefor the subsection you want to edit.Use Add attribute to give the
xi:includeelement thexlink:roleattribute. Set the value of thexlink:roleattribute toaccordion.
Select Save.
When you publish your content, or preview it as HTML5, the subsection will display as an accordion. If you use the subsection topic elsewhere, it will not display as an accordion (unless it is also set to have xlink:role="accordion" in the other locations).