Default the "Knowledge Article Comments" to have All Replied defaulted open

Rhys Kell
Tera Expert

Hi all!

Does anyone know if you can default the "Knowledge Article Comments" widget to onload have all replies open and toggle to close them?
e.g.

RhysKell_0-1709523386295.png

 

I'm not particularly experienced in this side of ServiceNow so any support would be great!

1 ACCEPTED SOLUTION

I had a little bit of a deeper look and you're correct, it is not possible using the OOB "Knowledge Article Comments" widget.

You are however able to clone and replace the OOB widget and subsequent OOTB angular ng-template "knowledge-comment-template.html"

 

The following changes will need to be made to the widget:

- Add ng-init="c.toggleAllComments()" in the Body HTML

-Update "knowledge-comment-template.html" in the Body HTML to be the new angular ng-template id

 

The following changes will need to be made to the ng-template:

- New angular ID

- Update data-ng-include='"knowledge-comment-template.html" to include new angular ID

 

It still wouldn't be recommended to implement as the amount customization required to build/maintain doesn't outweigh the need for this functionality.

View solution in original post

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Rhys Kell 

 

NO, not possible in OOTB and may be with huge customization. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

I had a little bit of a deeper look and you're correct, it is not possible using the OOB "Knowledge Article Comments" widget.

You are however able to clone and replace the OOB widget and subsequent OOTB angular ng-template "knowledge-comment-template.html"

 

The following changes will need to be made to the widget:

- Add ng-init="c.toggleAllComments()" in the Body HTML

-Update "knowledge-comment-template.html" in the Body HTML to be the new angular ng-template id

 

The following changes will need to be made to the ng-template:

- New angular ID

- Update data-ng-include='"knowledge-comment-template.html" to include new angular ID

 

It still wouldn't be recommended to implement as the amount customization required to build/maintain doesn't outweigh the need for this functionality.