MODULES
...
Siteglide Modules
Events

Browse Events by Keyword

5min
the article will show you how to adapt your liquid syntax and events layouts to allow the user to search for events by keyword introduction you can also allow the user to search for events by keyword this requires a slightly different liquid parameter from the other navigation methods, but you can use both parameters if you choose liquid syntax although all other events navigation options require you to set the use adv search 'true' liquid parameter, keyword search requires the use search parameter {% include 'module' id '12' layout 'design system/1' per page 20 show pagination 'false' use search 'true' %} if you wish to use both types of navigation for your events, you can set both types of search parameter to 'true' {% include 'module' id '12' layout 'design system/1' per page 20 show pagination 'false' use search 'true' use adv search 'true' %} html and javascript syntax this code can be included in one of your events navigation layouts keyword search will be activated if you've set the liquid parameter above and the javascript below sets the keyword parameter in the url search events by keyword add search keyword {% comment %} this example function will search for events in the future with this keyword you'll need to use the "use search" and "use adv search" parameters in your liquid tag {% endcomment %} searching and filtering at the same time the following example also filters for future events at the same time as it searches for keywords you need to have set both use search and use adv search parameters in the liquid (see syntax section above) you can adjust the javascript to remove this, or switch it to fetch events in the past \<script> function events search() { event preventdefault(); var keyword = document queryselector("#eventssearch") value; var url string = window\ location pathname+"?keyword="+keyword+"\&range lt={{now}} \&range type=past\&range field=events"; location assign(url string); } \</script>