Skip to content
Expanded Search plugin for Craft CMS
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
models
services
variables
.gitignore
CHANGELOG.md
ExpandedSearchPlugin.php
LICENSE.txt
README.md
composer.json
composer.lock
releases.json

README.md

Expanded Search Plugin for Craft CMS

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
You can’t perform that action at this time.