composedcreative / expandedsearch
Craft CMS search results with expanded meta data including the matched field, matched value and related values for certain field types
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2025-03-01 21:06:34 UTC
README
Installation
composer require composed/expandedsearch
Example
In your search results template
{% set expandedResults = craft.expandedSearch.search(query) %}
{% for result in expandedResults %}
<strong data-field="{{result.matchedField}}">{{result.entry.title}}</strong><br>
<p>{{result.matchedValue}}</p>
<a href="{{result.entry.url}}">{{result.entry.url}}</a>
{% else %}
<p>Sorry, no results for {{query}}.</p>
{% endfor %}
Roadmap
- Improve documentation
- Add handling for more non-scalar field types