0

I have a bunch of entries, each one with a Matrix field, consisting of a "Location" block type, with "Map" field (Ether Maps). I need to output some JSON, following a keyword search, but I'm having trouble searching the Maps field inside my Matrix. Here's what I have currently...

{% set searchQuery = craft.app.request.getQueryParam("keywords") %}
{% set entries = craft.entries.myMatrixField(':notempty:')({
    location: searchQuery,
    country: 'UK',
    radius: 25,
    unit: 'mi',
}).all() %}

This query isn't returning the any results. Both the Matrix and field have "Use this field’s values as search keywords" checked. Seems my query isn't reaching into the actual Maps field, just the Matrix maybe? Anyone help me out?

Your Answer

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

Browse other questions tagged or ask your own question.