Template Tags
Dexter provides two Antlers tags and one optional HTTP endpoint. Results come back as plain arrays from the search provider; nothing is rehydrated from the Stache, since the point of the index is that a search does not have to touch content storage.
{{ dexter:search }}
{{ dexter:search index="content" query="{ get:q }" limit="20" }}
{{ if no_results }}
<p>Nothing found.</p>
{{ else }}
<a href="{{ permalink }}">{{ title }}</a>
{{ /if }}
{{ /dexter:search }}index
Required. The index key from your config.
query
The search term. term is accepted as an alias.
limit
Maximum results. Falls back to searchLimit.
params
Provider-specific parameters as a JSON string.
filter
A raw provider filter string, passed through as-is.
{{ dexter:multi_search }}
Searches several indexes at once. Separate index names with a pipe.
{{ dexter:multi_search indexes="content|menu_items" query="{ get:q }" }}
<a href="{{ permalink }}">{{ title }}</a>
{{ /dexter:multi_search }}indexes
Required. Pipe-separated index keys.
query
The search term. term is accepted as an alias.
limit
Maximum results.
federation
Federation options as a JSON string.
A provider being unreachable does not take the page down. The failure is logged and the tag renders its {{ if no_results }} branch instead.
Last updated