This bundle adds a search-module for FAQ-sites and turns the FAQ-items into an accordion, which can have multiple items open simultaneously if more than one faq-item contains matches.
Install composer if you haven't already, then enter this command in the main directory of your Contao installation:
composer require w3scout/contao-searchfaq-bundle
- Create at least one FAQ category (without choosing a reader redirectpage)
- Add your FAQ items
- Create a "FAQ-Site" module and select "mod_faqpage_accordion" as individual template
- Create a "FAQ-Search" module and publish it above your FAQ-Site module
- Add the jQuery library to your theme and activate the following templates:
- Turn the items of a FAQ-Site into an accordion: open the FAQ-Site module configuration and choose "mod_faqpage_accordion" as individual module template. This works independently of the FAQ-Search module.
- Choose between standard accordion behavior (one open item at a time) or select the "j_accordion_open_multiple" template, if you need more than one open accordion item at the same time. Notice: this is not limited to FAQs, it works with standalone accordion elements too. But if you use the FAQ-Search, it is required!
Bug reports and pull requests are welcome