Skip to content

AgendaSearch

This hook retrieves Agenda events with as faceted search in SimpleSearch. The hook was introduced with Agenda 1.2.1.

It fills the facet events in SimpleSearch.

SimpleSearch Hook Properties

It uses the following hook properties:

Property Description Default
agendaCategoryTpl Name of a chunk that contains the template of one category in the category list of an event. tplAgendaEventCategory
agendaEnddate The end date to filter the displayed events. Must contain a supported date and time format. +99 year 0:00
agendaEventExtractTpl Name of a chunk that contains the template for the search extract of an event. tplAgendaEventSearchExtract
agendaImageTpl Name of a chunk that contains the template of one image in the image list of an event. tplAgendaEventImage
agendaLocationTpl Name of a chunk that contains the template for the location of an event. tplAgendaEventLocation
agendaResourceTpl Name of a chunk that contains the template for the linked resource of an event. tplAgendaEventResource
agendaSearchFields Since 1.7.10 Comma separated list of event fields, that are searched by the hook. If this property is filled, agendaSearchLocation is disabled.
agendaSearchLocation Search the location address. When disabled, only the location title is searched. true
agendaStartdate The start date to filter the searched events. Must contain a supported date and time format. today 0:00
agendaVideoTpl Name of a chunk that contains the template of one video in the video list of an event. tplAgendaEventVideo

The hook can be called as postHook in as SimpleSearch snippet call:

[[!SimpleSearchForm? 
&tpl=`tplAgendaSearchForm`
]]
[[!SimpleSearch?
&postHooks=`AgendaSearch`
&agendaSearchFields=`AgendaEvents.title`
&perPage=`20`
&facetLimit=`5`
&tpl=`tplAgendaSearchRow`
&pageTpl=`@INLINE <span></span>`
&toPlaceholder=`dummy`
]]
<div class="row mt-3 mb-3">
    <div class="col-12">
    <h4>[[%search_results? &namespace=`core` &topic=`default`]] Agenda</h4>
    <p>
    [[!+simplesearch.events.results]]
    </p>        
    </div>
</div>