Theme builder: Apply theme to single user

aldro61
Tera Contributor

Hi, I created a theme with the theme builder app and would like to apply it to a single user. Can I achieve this via user preferences? I know I can set a theme variant in user preferences, but not sure how to do this for a theme.

 

Reason for this: I want to display a different logo at the top of the instance and it seems like theme variants cannot change the logo. This means I have to resort to multiple themes.

 

Thank you!

2 ACCEPTED SOLUTIONS

The Machine
Kilo Sage

When using the theme builder and apply it, it applies that theme to everybody.  You would need to use a variant if you only want it to apply for a single user.  At least from my experience.  You could make a variant of your theme and apply the different logo / image to the variant.

Hope that helps you.  Good luck.  

View solution in original post

You can make custom logos in variants. I have gotten much better at it since my last posts. I will try to explain below. 

 

I will start by saying scope almost does not matter, but kind of does. It only matters that you DO NOT INSERT AND STAY records into the sn-themes scope. It is a private scope to ServiceNow so you won't be able to delete or modify anything you do an Insert and Stay into that scope. It just sits there until you clone over your instance or open a Now Support ticket and ask them to delete the record. 

 

Other than that, you can do the activities below in Global, a new scope, or an existing scope. Deploy using whatever you feel like that day (App Repo, Source Control, ... Update Sets if you must). 

 

I personally like to keep all of my theme related files in a scope call "Next Cool Themes". 

 

 

1) MAKE YOUR INSTANCE LOGO (THE EASY WAY)

Open Photoshop or an image editor. Create a new image size 656x128. Style as needed. Export to PNG. 

 

2) CREATE YOUR VARIANT

Your mileage may vary here, so I'll explain how to do it with the default Polaris theme. 

 

Create a new record on "UX Style"

https://INSTANCE.service-now.com/sys_ux_style.do?sys_id=-1

 

Name: My new variant

Type: Variant

Style: <leave blank>

 

Go back to the record you just created.

https://INSTANCE.service-now.com/sys_ux_style_list.do?sysparm_query=type%3Dvariant

(HINT: Go to [sys_ux_style], add the Updated column, and sort by newest to oldest

 

On the related list "UX Style Assets", click New.

 

Click the reference field magnifying class icon next to the "Asset" field. -> Click New in the pop-up. -> Set Category to Image.

 

Set the Name field to anything, but I like to make something all lowercases with dashes instead of spaces like they out of the box example. (Ex. my-new-variant-instance-logo). 

 

Click Submit.

 

Back on the "UX Style Assets" new record form, paste this into the Asset Properties: 

{ "position": "header_logo" }

 

Click Submit

 

You should still be on the UX Style record, but if not go back to it. 

https://INSTANCE.service-now.com/sys_ux_style_list.do?sysparm_query=type%3Dvariant

 

Click the "UX Theme Styles" related list - > Click New

 

In the Theme field put "Polaris" -> Change Order to "10" -> Click Submit

 

Run cache.do

 

Refresh your browser page

 

Click on your avatar in the top right -> Click Preferences -> Themes

 

The new logo should appear when you select the new theme. 

 

And yes, the theme preference is a User Preference so you can set it up for a single user. 

 

Hope this helps! 

 

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

 

 


--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow

View solution in original post

9 REPLIES 9

The Machine
Kilo Sage

When using the theme builder and apply it, it applies that theme to everybody.  You would need to use a variant if you only want it to apply for a single user.  At least from my experience.  You could make a variant of your theme and apply the different logo / image to the variant.

Hope that helps you.  Good luck.  

Thank you, this is the conclusion I came to. Let's say I went with variants instead, do you know how I can include a custom logo? I tried adding it to the variant as an image asset (following these instructions https://dev.to/23thom/create-a-theme-for-your-configurable-workspace-5000), but without success. Maybe these instructions are outdated?

Thanks again!

aldro61
Tera Contributor

Actually, I figured it out. It doesn't work for variants of the default Polaris theme, but it does if you create a custom theme. Thanks for your help.

 

You can make custom logos in variants. I have gotten much better at it since my last posts. I will try to explain below. 

 

I will start by saying scope almost does not matter, but kind of does. It only matters that you DO NOT INSERT AND STAY records into the sn-themes scope. It is a private scope to ServiceNow so you won't be able to delete or modify anything you do an Insert and Stay into that scope. It just sits there until you clone over your instance or open a Now Support ticket and ask them to delete the record. 

 

Other than that, you can do the activities below in Global, a new scope, or an existing scope. Deploy using whatever you feel like that day (App Repo, Source Control, ... Update Sets if you must). 

 

I personally like to keep all of my theme related files in a scope call "Next Cool Themes". 

 

 

1) MAKE YOUR INSTANCE LOGO (THE EASY WAY)

Open Photoshop or an image editor. Create a new image size 656x128. Style as needed. Export to PNG. 

 

2) CREATE YOUR VARIANT

Your mileage may vary here, so I'll explain how to do it with the default Polaris theme. 

 

Create a new record on "UX Style"

https://INSTANCE.service-now.com/sys_ux_style.do?sys_id=-1

 

Name: My new variant

Type: Variant

Style: <leave blank>

 

Go back to the record you just created.

https://INSTANCE.service-now.com/sys_ux_style_list.do?sysparm_query=type%3Dvariant

(HINT: Go to [sys_ux_style], add the Updated column, and sort by newest to oldest

 

On the related list "UX Style Assets", click New.

 

Click the reference field magnifying class icon next to the "Asset" field. -> Click New in the pop-up. -> Set Category to Image.

 

Set the Name field to anything, but I like to make something all lowercases with dashes instead of spaces like they out of the box example. (Ex. my-new-variant-instance-logo). 

 

Click Submit.

 

Back on the "UX Style Assets" new record form, paste this into the Asset Properties: 

{ "position": "header_logo" }

 

Click Submit

 

You should still be on the UX Style record, but if not go back to it. 

https://INSTANCE.service-now.com/sys_ux_style_list.do?sysparm_query=type%3Dvariant

 

Click the "UX Theme Styles" related list - > Click New

 

In the Theme field put "Polaris" -> Change Order to "10" -> Click Submit

 

Run cache.do

 

Refresh your browser page

 

Click on your avatar in the top right -> Click Preferences -> Themes

 

The new logo should appear when you select the new theme. 

 

And yes, the theme preference is a User Preference so you can set it up for a single user. 

 

Hope this helps! 

 

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

 

 


--------------------------------------------------
Workflow Cowboy
LinkedIn: https://www.linkedin.com/in/dalestubblefield/
YouTube: https://www.youtube.com/@starlordnow