MODULES
...
Siteglide Modules
Events
Browse by Category
8min
you can dynamically output a navigation menu of categories which have events assigned to them the user can then filter the events prerequisites you have installed events module you have added at least one category to an event introduction this article will show how to include this navigation option when including the events list the default layouts with explanation how to give the user feedback on the type of results they are seeing to include this option include the following liquid to dynamically get a list of available events categories for the user to select {% include 'modules/siteglide system/get/get categories' categories layout 'design system/1/categories' categories layout type 'list' %} the parameters refer to layouts which will be used to display the category links categories layout should be the path to the folder in the events module where your category navigation files are stored the category layout type is the sub folder where the wrapper and item files are stored for filtering the events list by category e g list the category layout type exists because some events layouts may have a different partial layout for categories within a events preview, footer or sidebar default layout examples with explanation wrapper liquid categories {% include 'modules/siteglide system/get/get items' item layout 'item' %} item liquid {{this properties name}} the link should be the slug of your events list view followed by ?category={{this id}} siteglide will be able to read the category id from the url and populate the list view on refresh in this example we use the context object to automatically get the slug of the current events page user feedback displaying the currently applied filter you may wish to give the user some feedback about the current filter/ search terms that are applied on the events list for categories, you can use {{context exports}} object to get the name of the category you are filtering by {% if context params category %} {{context exports categories data\[context params category] name}} events {% endif %}