Can we change the browser tab title on the Service Portal for a single catalog item

Madhura5
Tera Contributor

Hi All,

Can we change the browser tab title on the Service Portal for a single catalog item. Currently it is displayed as 'Service Catalog - IT Services' for all catalog items.

find_real_file.png

I want to modify it to 'Service Catalog - HR Services' only for one HR catalog item. 

Thanks,

Madhura

 

1 ACCEPTED SOLUTION

Here are the steps you can follow.

1. Create a new widget <item_change_tab_title> and add below code in the client controller section.         

       function ($scope,  $document) {

              $document[0].title = <your desired page title>;

       }

2. create a new field on your catalog item of macro type and attach your widget <item_change_tab_title>.

Regards,

Mandeep

View solution in original post

7 REPLIES 7

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi Madhura,

here you'll find the solution:

https://community.servicenow.com/community?id=community_question&sys_id=7843566fdb9d5f40852c7a9e0f96...

If I have answered your question, please mark my response as correct and/or helpful.

Thank you very much

Cheers
Alberto

Hi Alberto,

I have tried the solution mentioned in the community link but I was not able to restrict it only for one catalog item. I want the name on the browser tab to be modified only for a single catalog item.

Mandeep Karan
Tera Guru

Hi Madhura,

you can use "$document[0].title = <your desired page title>" to set the page title.

You can use this in client controller of widgets.

I used it in widget for catalog item.

 

Regards,

Mandeep

make sure to add $document in your function parameter also. 
function ($scope,  $document) {

        $document[0].title = <your desired page title>;

}