Edited for clarity:

I do have a search form in the frontend where customers can enter keywords. The way it searches now only returns exact matches. I'd like to tell Craft to look for works containing the keyword the look for.

I know I have to set the 'q' param to do this but I have no idea what I should do.

Search for results page:

{% set query = craft.request.getParam('q') %}
{% set entries = craft.entries.search(query).section('oeuvres').order('score') %}

1 Answer 1


From the docs:

{% set results = craft.entries.search('*' ~ query ~ '*').order('score') %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.