Expand all/Collapse all button on knowledge article for accordion layout

Aaron Struphar
Kilo Guru

Hello, we have a business requirement to add a button to a knowledge article to Expand All or Collapse All accordion sections. Currently, we have a knowledge article that has 20 sections on it and it is laid out in an accordion format. So they can currently expand/collapse each individual section, but they want a button at the top and bottom that would expand/collapse ALL sections, rather than just one. Is this possible to do within a knowledge article? If so, any suggestions on where to start? This level of HTML/CSS is above our current expertise.

 

Side note: The accordion HTML and CSS was developed and implemented by the business, not our development team. But they aren't able to figure it out so they're passing to us. Is this within the scope of a SNOW development team?

1 ACCEPTED SOLUTION

Aaron Struphar
Kilo Guru

Update: It appears that the source code does not allow JavaScript to be used.

View solution in original post

3 REPLIES 3

Abbas_5
Tera Sage
Tera Sage

Hello @Aaron Struphar,

Please refer to the link below:

https://www.servicenow.com/community/now-platform-forum/expand-collapse-text-within-a-knowledge-arti...

https://www.servicenow.com/community/knowledge-managers/expand-collapse-text-within-knowledge-articl...

 


If it is helpful, please mark it as helpful and accept the correct solution. In future, it might be helpful for someone to refer to this solution.

Thanks & Regards,

Abbas Shaik

Hello Abbas,

These links show how to expand/collapse single sections, not all sections at once.

Aaron Struphar
Kilo Guru

Update: It appears that the source code does not allow JavaScript to be used.