Widget to show 'latest' Knowledge Articles in HR Portal

Carl Fransen1
Tera Guru

Hi Team,

We have a requirement where inside the HR Portal we want to be able to show a widget of the 'latest articles'.  The 'Latest' timeframe should ideally be configurable, but for starters we're going with 'within the last month'.

Has anyone done anything similar that I could use as a starter?

 

Thanks

Carl.

 

1 ACCEPTED SOLUTION

Gaurav Bajaj
Kilo Sage

Hi,

I have designed a new widget to display latest articles created in last 30 days which is also a configurable property through widget options.

Please try it & let me know if you need any help.

 

find_real_file.png

 

Attached is the code for the widget.

Please mark it correct/helpful based on the response.

Thanks
Gaurav

 

View solution in original post

10 REPLIES 10

Thanks for your reply, appreciate your help.  The query in the backend shows the following:

 find_real_file.png

If I query all 3 KB’s they all return results of at least one.

The config is set as per below:

find_real_file.png 

As you can see even when the ‘benefits’ category is selected (which the original picture shows as the result of one of the documents), the widget still shows nothing…  I’ve even tried to leave this blank.

 

However you mention selecting the KnowledgeBase itself, but I can only see to select a category, as per below.  How can I select the entire knowledgebase?

Could it be that the widget is in the ‘Global’ Scope and the HR Portal is in the ‘Human Resources: Service Portal’ scope?  But then nothing would show even when I set it to 500 days – but it does show articles…?

Appreciate your help.

 

Cheers

Carl.

 

Yes, the scope can be an issue. Please move the widget to HR application scope.

Also, you can set the KB base at the portal level.

 

I have selected the KB in the HR Portal, so I know this works.

I created a new widget for the HR:Service Portal scope - I still can't get 30 days to work but it does seem to work for 50 days.... so I'll take that for now!

 

Thanks for your assistance.

 

Cheers

Carl.

No problems, I will look into 30 days issue if I can find something wrong with the code.

Hi Gaurav,

Thanks for looking into this, appreciate it.

Carl.