Page 1 of 1

How to setup user home to search with options

PostPosted:Wed Jun 30, 2021 12:14 pm
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)

Re: How to setup user home to search with options

PostPosted:Sat Jul 03, 2021 6:37 pm
by jllort
For default home search, you are thinking about always have a search loaded by default?

Re: How to setup user home to search with options

PostPosted:Sun Jul 04, 2021 10:19 am
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

Re: How to setup user home to search with options

PostPosted:Wed Jul 07, 2021 8:11 am
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)

Re: How to setup user home to search with options

PostPosted:Sun Jul 18, 2021 10:17 am
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.

Re: How to setup user home to search with options

PostPosted:Thu Sep 02, 2021 4:58 am
by teera_w
Can we get guide from you, Jllort?

Re: How to setup user home to search with options

PostPosted:Sat Sep 04, 2021 4:29 pm
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 ).