# Adding filters to a page that takes a product list

**URL:** <https://forum.litium.com/t/adding-filters-to-a-page-that-takes-a-product-list/1212>\
**Category:** Questions\
**Tags:** litium-6\
**Created:** [November 20, 2019, 7:45am UTC](https://forum.litium.com/t/adding-filters-to-a-page-that-takes-a-product-list/1212 "2019-11-20T07:45:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan.gross](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@stefan.gross](https://forum.litium.com/u/stefan.gross)\
**Post date:** [November 20, 2019, 7:45am UTC](https://forum.litium.com/t/adding-filters-to-a-page-that-takes-a-product-list/1212/1 "2019-11-20T07:45:46Z")

</div>

Hello,

we have a page that takes a product list and renders all the products. The customer uses this kind of page for when they are having sales. The problem is the list contains products from alot of categories and we would like to add an extra filter for categories as well as color and sizes. I havn’t found any good resource in docs which would lead me in the correct direction. What is the best way to approach this for an accelerator solution?

Litium version: 6.2

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [November 20, 2019, 9:53am UTC](https://forum.litium.com/t/adding-filters-to-a-page-that-takes-a-product-list/1212/2 "2019-11-20T09:53:00Z")

</div>

Try changing the method `GetPropertyNames` in `ProductFilterTags.cs`:

```auto
if (_context.CurrentState.PageType.Name.IsSearchResultPageType() || _context.CurrentState.PageType.Name.IsProductListPageType())
{
	return new[] { FilteringConstants.FilterProductCategories }.Concat(filters);
}

```

This would give you the same view as on the search result page.

If you want to add additional products filters on your site, you can edit the AcceleratorFilterFields field under Settings \> Products \> Fields.

---

<div class="post-metadata">

**Author:** ![stefan.gross](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@stefan.gross](https://forum.litium.com/u/stefan.gross)\
**Post date:** [November 20, 2019, 1:08pm UTC](https://forum.litium.com/t/adding-filters-to-a-page-that-takes-a-product-list/1212/3 "2019-11-20T13:08:09Z")

</div>

Changing the IF statement did the trick. Thank you @NilsN!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [December 18, 2019, 1:08pm UTC](https://forum.litium.com/t/adding-filters-to-a-page-that-takes-a-product-list/1212/4 "2019-12-18T13:08:10Z")

</div>

Closed on December 18, 2019, 1:08pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
