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. If this property is empty, the joined categories are not read from the database and parsed. 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. If this property is empty, the joined images are not read from the database and parsed. tplAgendaEventImage
agendaLocationTpl Name of a chunk that contains the template for the location of an event. If this property is empty, the joined locations are not read from the database and parsed. tplAgendaEventLocation
agendaResourceTpl Name of a chunk that contains the template for the linked resource of an event. If this property is empty, the joined resources are not read from the database and parsed. 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. -
agendaSortBy Since 1.9.1 Sort field for sorting the output. It can also contain a JSON object to sort the ouput by multiple fields like
{"AgendaCalendars.name":"ASC","AgendaCalendars.background":"DESC"}
.
{"EventDates.startdate":"ASC"}
agendaSortDir Since 1.9.1 Sort direction for sorting the output. Unused when the agendaSortBy property contains a valid JSON object. -
agendaStartdate The start date to filter the searched events. Must contain a supported date and time format. today 0:00
agendaUseCursus Bypass the cursus.event_where system setting and don’t fill unnecessary Cursus placeholders. 1 (Yes)
agendaVideoTpl Name of a chunk that contains the template of one video in the video list of an event. If this property is empty, the joined videos are not read from the database and parsed. tplAgendaEventVideo

The AgendaSearch hook currently searches the following fields: AgendaEvents.title, AgendaEvents.description, AgendaEvents.content, EventDates.title, EventDates.description, Location.name, Category.name

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=`simplesearch.results`
]]
<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>
  <hr>
<div class="row mt-3 mb-3">
    <div class="col-12">
    <h4>[[%search_results? &namespace=`core` &topic=`default`]] Resources</h4>
    <p>
    [[!+simplesearch.results]]
    </p>
    </div>
</div>