Filter Module
Adding tag page_show_filter to any blog or calendar page turns on the include of the _z_module_filter.html module
Dev setup:
- Add _z_module_filters.html (from IFEM codebase)
- Add _z_module_filters_get_card_filter_data.html (from IFEM codebase)
- Add _z_module_filters.js (from IFEM codebase)
- Add _z_module_filters.scss (from IFEM codebase)
- Add _z_module_filters_example.html (from IFEM codebase)
- For cards you want to filter
- Add filter data to card outer (must be at top level of card)
data-filter="{% include "z_module_filters_get_card_filter_data" page:post/event %}"
- Add filter data to card outer (must be at top level of card)
- Include _z_module_filter.html just above the grids in the desired blog and calendar templates, e.g.
- _z_pages_show_blog_post_wide.html, and
- _z_pages_show_calendar_wide.html
``
Nationbuilder CMS setup:
- Tag the blog/calendar/page “page_show_filters”
- Create and publish a subpage that has “filter” in the slug e.g. “resource_filter_settings”
- Add “no-robots” tag to subpage.
- Add filter data via the content page. Copy the html in _z_module_filters_example.html for a start.
- To tag cards into filters, use the admin_edit_link on the page with the filter to get a nice list of available filters, ready to copy+paste. (We could even make a “click to copy to clipboard” button, to better guarantee the admins are getting exactly the right tag)