How to setup user home to search with options

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
teera_w
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: Fri Jun 25, 2021 11:07 am

How to setup user home to search with options

Post by teera_w »

Based on Standard of OpenKM, can we setup default home for user to search function with some options selected?

For our expected is when login to openKM as Search tab with "View advanced mode" selected.
(Another one is should have stored searches for specific user)
Attachments
Forum_SetUserHome.jpg
jllort
Moderator
Moderator
Posts: 11598
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: How to setup user home to search with options

Post by jllort »

For default home search, you are thinking about always have a search loaded by default?
teera_w
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: Fri Jun 25, 2021 11:07 am

Re: How to setup user home to search with options

Post by teera_w »

jllort wrote: Sat Jul 03, 2021 6:37 pm For default home search, you are thinking about always have a search loaded by default?
Yes, corrected. I looking for :
- User Login, and Initial with search tab, selected "View advanced mode"
- For Stored search, I think for made some set of Stored search for individual user by Administrator
teera_w
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: Fri Jun 25, 2021 11:07 am

Re: How to setup user home to search with options

Post by teera_w »

Can anyone suggest for this topics?

In Profile settings, I have completed to hide another tab (Desktop, Dashboard) for user to start up at Search tab.
But still no idea to selected some options in Search tab to be startup configuration. (View advanced mode, and default Stored search)
jllort
Moderator
Moderator
Posts: 11598
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: How to setup user home to search with options

Post by jllort »

In the profiles, you can choose to have the search view visible by default, but what is not implemented is load a search by default. For this kind of behaviour, the source code should be modified. If you wish I can try to guide you about how to do it.
teera_w
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: Fri Jun 25, 2021 11:07 am

Re: How to setup user home to search with options

Post by teera_w »

Can we get guide from you, Jllort?
jllort
Moderator
Moderator
Posts: 11598
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: How to setup user home to search with options

Post by jllort »

* First, the search should be marked as default for it purpose should modify the class `QueryParams` and `GWTQueryParams` with a new boolean named default.
* Add some method to mark a query as default and get the default query, take a look at `SearchServlet`, `OKMSearch` and `DbSearchModule` classes.
* To mark a query as the default query, should take a look at `SearchSaved` and specially the contextual menu `com.openkm.frontend.client.widget.searchsaved.Menu` class -> there you should mark the search as the default search.
* Finally to execute automatically a search in the startup should set the focus at `SearchSaved` class line 83 in the method named init ( after the searches are loaded you should execute the single search marked as default ).
Post Reply