Apply branding on Knowledge Article based on User Company

Mike50
Kilo Guru

Hello ServiceNow Community,

 

I am looking for the advice regarding the Knowledge Branding in ServiceNow.

 

My goal is to display one Knowledge Article, but displayed with different branding for different Users (depending on the Company value that is set in the User record). Suppose that by branding I mean the article header with the customer specific logo and some text.

 

What do you think would be the best way to achieve this?

 

Thank you in advance for your help.

3 REPLIES 3

Jakob Anker
ServiceNow Employee
ServiceNow Employee

Hi 

You might want to consider knowledge blocks 

 

 

 

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Mike50 ,
I trust you are doing great.

  1. First, you need to create a new field on the User table to store the company branding information. You can call this field something like "Company Branding Logo" and set the data type to "Image".

  2. Next, create a new UI Macro that will be used to display the article header with the customer specific logo and text. In this macro, you can reference the "Company Branding Logo" field on the User table to dynamically display the appropriate branding for each user.

  3. Once you have created the UI Macro, you can add it to the "Knowledge Article Header" template. To do this, navigate to "Knowledge > Administration > Knowledge Bases" and select the appropriate knowledge base. Then, click on "Templates" and edit the "Knowledge Article Header" template.

  4. In the template editor, add the UI Macro you created in step 2 to the appropriate location in the template. You can use the "insert macro" button to do this.

  5. Save the template and test it out by viewing a knowledge article as different users with different company branding information.

Please find the below code for the same.

<div class="knowledge-article-header">
  <img src="${gs.getUser().getValue('company_branding_logo')}" alt="Company Logo">
  <h1>${knowledge.title}</h1>
  <p>${knowledge.short_description}</p>
</div>

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



@Amit Gujarathi ,

thank you for your suggestion.

Unfortunately, points 3. and 4. that you described are not fully clear.

Is there any option to add UI Macro to a Knowledge Article Template? Can you please explain how to achieve this?

Thank you in advance.