Search in the current folder only
Hi there,
I have a relatively simple requirement: search for documents under the current folder. A similar issue has been discussed here, but I think I am missing something.
I am using WebUI, so query parameters in the modeller are not there for me (as mentioned in here)
I've configured my page provider with a respective parentId parameter (although that would only find documents directly in the folder, but that's the next step to fix):
Then I've configured a drawer search item, had it pass the document's uid:
It seems, however, that that argument is not passed to the query, the following URL is executed:
/nuxeo/api/v1/search/pp/demoSearchCurrentFolder/execute?currentPageIndex=0&offset=0&pageSize=40&system_fulltext=
No sign of my parameter whatsoever….
My page provider looks the following:
What am I doing wrong? Can parameters be used when configuring the search? If not, how to limit the search to the current folder only?
Many thanks! m
Hi Michal;
This use case is described in https://github.com/nuxeo/nuxeo-studio-community-cookbook/tree/master/modules/nuxeo/designer-tips-tricks#update-the-children-document-listing-in-the-view-tab-of-folderish-documents.
Have a great day
Thanks for the quick reply. The use case looks similar (albeit I think applies to a different scenario - I'm referring to a search where a user provides the search criteria), but it does give an overview of the options. Thanks again!
Sincerely mm
It kind of works with a custom “listing” tab: .
It's called search and available only for folderish documents.
I'm not sure if that's the correct approach though, makes sense? What bothers me currently is that results stay on the tab even if I navigate to a different folder. It's not as intuitive as one could expect. Can I have results cleared automatically once tab is opened? I was hoping auto search would help, but apparently it doesnt recognize the change of the context attribute