How to hide author in KBA

SNhydrone
Tera Contributor

hi! How do I hide/remove author in the KBA in the portal view? 

1 ACCEPTED SOLUTION

Hey, @Sid_Takali - While that CSS will work there, that is the only place it will work. I believe the author will still show up in searches (potentially) and OOTB widgets such as Most Viewed, Featured, etc. To remove the author in all locations, you either control the system property, or, you would have to Clone all OOTB widgets (ones I mentioned above), and change the server script as well as the CSS.

 

I have done just the CSS before and it did not remove from all locations as per requirements (typical if multiple groups are involved, all groups would want to remove the author. I have found through customers that end users will often see the name of the author to an article, and start reaching out to them directly. Something that is usually not wanted by an organization). Here, I have done just as you have shown, and here is the main page with the widgets and the article view itself (typically the widgets are being used which is why I wanted to show them there):

RobSestito_0-1720811160131.png

From Search:

RobSestito_1-1720811226516.png

RobSestito_2-1720812289860.png

 

So yes, adding changes to the CSS and server script will work, you then have to take into account cloning those widgets, as they are protected by Read-Only policy from ServiceNow. Those would then become the customers responsibility with future upgrades.

 

Collectively, best to decided which is the best route. Are all departments involved in the instance okay with removing the author, or, is just HR for example? Control the system property, or, clone multiple widgets to change CSS and server script (keeping in mind, now you own those widgets and they will not receive any future updates pushed out by SN)?

 

Either way you go, you have options @SNhydrone - to remove author from view which is nice. But you should consider all aspects. If other departments are involved and do not want to remove author, then you should not use the system property as I have mentioned.

 

Hope this helps!

Cheers,

-Rob

View solution in original post

8 REPLIES 8

Rob Sestito
Mega Sage

Hello @SNhydrone - 

I believe you can turn off the system property that is controlling the "show author" option.

 

  • In the filter nav type in sys_properties.LIST
  • In the Name column search for author
  • Locate glide.knowman.search.show_author (Which should show a value of true)
  • Change the value to false, refresh your URL for your portal, and author should be removed

Property set to True:

RobSestito_1-1720795487970.png

 

Property set to False:

RobSestito_2-1720795528638.pngRobSestito_3-1720795561223.png

 

Give this a try and see if that works for you.

Cheers,

-Rob

 

Sid_Takali
Kilo Patron
Kilo Patron

Hi @SNhydrone @Rob Sestito Turning off the system property that is controlling the "show author" option will impact across the platform. I believe best way to hide on the specific Portal would be to add some CSS to the widget instance that shows the knowledge article content. 

Refer below steps

1. Ctrl + Right Click on portal and click on page in designer

Sid_Takali_0-1720797679889.png

 

2. Add below CSS code to Page Specific CSS

Sid_Takali_1-1720797775076.png

 

Sid_Takali_2-1720797830874.png

 

.author {
   display: none;
}

 

Sid_Takali_3-1720797885367.png

 

Please mark my response Correct/Helpful

Regards,

Sid

Hey, @Sid_Takali - While that CSS will work there, that is the only place it will work. I believe the author will still show up in searches (potentially) and OOTB widgets such as Most Viewed, Featured, etc. To remove the author in all locations, you either control the system property, or, you would have to Clone all OOTB widgets (ones I mentioned above), and change the server script as well as the CSS.

 

I have done just the CSS before and it did not remove from all locations as per requirements (typical if multiple groups are involved, all groups would want to remove the author. I have found through customers that end users will often see the name of the author to an article, and start reaching out to them directly. Something that is usually not wanted by an organization). Here, I have done just as you have shown, and here is the main page with the widgets and the article view itself (typically the widgets are being used which is why I wanted to show them there):

RobSestito_0-1720811160131.png

From Search:

RobSestito_1-1720811226516.png

RobSestito_2-1720812289860.png

 

So yes, adding changes to the CSS and server script will work, you then have to take into account cloning those widgets, as they are protected by Read-Only policy from ServiceNow. Those would then become the customers responsibility with future upgrades.

 

Collectively, best to decided which is the best route. Are all departments involved in the instance okay with removing the author, or, is just HR for example? Control the system property, or, clone multiple widgets to change CSS and server script (keeping in mind, now you own those widgets and they will not receive any future updates pushed out by SN)?

 

Either way you go, you have options @SNhydrone - to remove author from view which is nice. But you should consider all aspects. If other departments are involved and do not want to remove author, then you should not use the system property as I have mentioned.

 

Hope this helps!

Cheers,

-Rob

Hi! I tried this however the Author is still showing in our page. How can I Identify what could be the conflict? Current widget is Knowledge Article Content and Page view is kb_article_view.