Custom search box for plone5 addon

Hi

I am building an addon for plone5. I'd like to add a custom search box to a browserview . The input text should be searched in fields(like title, description) of a content type. How to perform such querying in plone? Any pointers would be helpful :slight_smile:

You could use collective.portlet.collectionfilter. It is also mentioned here: https://training.plone.org/5/mastering_plone/custom_search.html

I did this recently using patternslib and reusing Plone's builtin search.

I've linked to the spot in this video where this is demonstrated.

They use a custom browser view but you can use Plone's @@search view.
Also look at the documentation for pat-inject http://patternslib.com/inject/

1 Like

You can do this really quickly with rapido.
Here's a snippet that you can use as a good starting point.

2 Likes