How to use it
- Select a Checkbox filter and turn on its hierarchical option.
- Tick Collapsible sub-terms.
- Open the page. Each term that has children shows a chevron. Click it to show or hide the sub-terms.
How it works
- Folding works at any depth. A sub-term with children of its own gets its own chevron.
- A group that contains a ticked term starts open. If the visitor closes it, it stays closed.
- When Bricks refreshes the filter by AJAX, Kiln restores which groups were open.
- Each chevron is a button with a label such as "Show sub-terms: Shoes" or "Hide sub-terms: Shoes", so screen readers announce which term it controls. The button also reports whether the group is open.
- A parent that Bricks marks as empty (no results) gets no chevron.
Limits
- It does not work together with Limit options (Bricks' Show more). Both hide rows, so the control is hidden while Limit options has a value.
- Folding applies on the front end only. The builder canvas shows every row.
- Without JavaScript, every row shows.
- The script and stylesheet load only on pages with a filter that uses the option.
Settings
None. Turn the module on in Bricks > Kiln (it is on by default).
Requirements
Bricks 2.4 or newer.