Is there a way to change the default option in the "filter by" field of the topic content widget?

LamdenHall
Tera Expert

In the employee center application there is a widget called Topic Content which displays all the different things within a topic. I want to change the default option in the "filter by" dropdown within this widget from "All" to "Requests". I have not been able to do this out of the box. Does anyone know how I can modify this widget in that way?

1 ACCEPTED SOLUTION

Hello Robert,

I did find a solution to this issue which I will share here.

You may not be able to edit the out of the box version of the Topic Content widget so to get around that I created a copy of the widget and used that on the Taxonomy Topic page instead. 

Once you have the copy you can change how the filter options are sorted in that widget by modifying the server script. In my version line 117 of the server script of the topic content widget is:

data.filterBy = '';
You can modify this or something else in the script to change how the order of filter options is displayed. The top filter option is what is selected and the users will see when they see the widget for the first time on a page load. In our case we put the sys_id of the option we wanted to appear by default in the quotes and that got it to appear first for users.
Hopefully this helps.

View solution in original post

4 REPLIES 4

Robert Pryke
Tera Contributor

@LamdenHall Have you been able to figure out how to do this? I have the exact same question.

Hello Robert,

I did find a solution to this issue which I will share here.

You may not be able to edit the out of the box version of the Topic Content widget so to get around that I created a copy of the widget and used that on the Taxonomy Topic page instead. 

Once you have the copy you can change how the filter options are sorted in that widget by modifying the server script. In my version line 117 of the server script of the topic content widget is:

data.filterBy = '';
You can modify this or something else in the script to change how the order of filter options is displayed. The top filter option is what is selected and the users will see when they see the widget for the first time on a page load. In our case we put the sys_id of the option we wanted to appear by default in the quotes and that got it to appear first for users.
Hopefully this helps.

Sagar Rd
Tera Contributor

HI @LamdenHall 

 

Could you please help me how can we add new filter by options??

 

Thankyou

Mourya

Hello,

I do not have experience modifying this widget to add new filter options. It should be possible but I have no proof of its feasibility. It may be easier to create your own widget depending on what the options you want to add are.

Sorry I can't be of more help.