> For the complete documentation index, see [llms.txt](https://docs.globo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globo.io/filters/filter-options/configure-collection-data-source/add-sub-collections-to-filter-option.md).

# Add sub-collections to filter option

Add sub-collections to a Collection-sourced filter option to build a nested parent-child collection tree.

## What this does

By default, a Collection-sourced filter option lists every collection flat, with no hierarchy. Turning on sub-collections lets you nest collections under a parent instead — for example, a "Category" filter option showing "Men" and "Women" as top-level entries, each expandable to reveal "Shirts", "Shoes", and so on underneath, instead of one long flat list of every collection.

## Prerequisites

* This feature only works with Filter Options whose Data source is Collection! — see [Configure collection data source](/filters/filter-options/configure-collection-data-source.md).

## Steps

1. Open the filter option (or click **Add filter option** to create one, then set **Source** to **Collection**).
2. Turn on **Build a collection tree with multi-level sub-collections**.
3. Under **Collection tree**, drag collections from **Available collections** into position, and drag rows within the tree to nest one collection under another (the parent-child relationship follows how you position them).
4. Click **Save**.

![Edit filter option — Source and Display type both set to Collection, collection tree builder below](https://2009335375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKmtdB4I84W3J8hc91H4S%2Fuploads%2Fgit-blob-ef78ef78058054448df1d15e9453028a40304b49%2Fdisplay-all-collection-values-edit-filter-option.png?alt=media)

Shoppers then see the nested structure in the storefront filter sidebar, with parent collections expandable to reveal their children.

## Related pages

* [Configure collection data source](/filters/filter-options/configure-collection-data-source.md)
* [Display all collection values in filter option](/filters/filter-options/configure-collection-data-source/display-all-collection-values-in-filter-option.md)
* [Configure filter options](/filters/filter-options/configure-filter-options.md)
