How to create a collapsible section in a knowledge article

thomashansson
Tera Expert

We will migrate content from IBM Notes to ServiceNow KB. Lot of documents which are more than one page have collapsible sections which makes them easy to overview and read. 

Has anyone found out how to create a collapsible section in a knowledge article?

11 REPLIES 11

find_real_file.png

Were you able to apply the suggested solution?

If I have answered your question, please mark my response as correct and/or helpful so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

I didn´t work for me with the code in the community post.

<div class="panel list-group">
    <a class="list-group-item" style="color: #646464 !important;" href="#a1" data-toggle="collapse" data-target="#a1">General IT Related changes</a>
    <div id="a1" class="collapse">
        <div class="list-group-item">
            <p>Content</p>
            <ul>
                <li>List Item 1</li>
                <li>List Item 2</li>
                <li>List Item 3</li>
            </ul>
        </div>
    </div>
</div>



But it did work with this HTML5 code.

<details>
<summary>Details</summary>
Something small enough to escape casual notice.
</details>

 

Also needed html_sanitize=false. Is it safe to use this attribute?

Did you find any solution to make it work in IE ?

Right now I am exploring collapsible fields in an article template in New York. It´s not as flexible as I would like but it collaps/expand.