This is the code for a Magento 2 module that will create a custom CMS page with layered navigation and a custom collection. For this example, the page URL is /onsale/index/display, and the collection is filtered by an attribute called 'onsale'.

rtownley 90dee6cb5f Merge branch 'master' of advcha/Magento_2_Module_Custom_CMS_Page_with_Layered_Navigation into master 4 years ago
RTownley ab50e10ad3 Fixed the product count for the category and price 5 years ago
LICENSE.md fc8e2550c5 First commit. 5 years ago
README.md fc8e2550c5 First commit. 5 years ago

README.md

Magento 2 Module - Custom CMS Page with Layered Navigation

This is the code for a Magento 2 module that creates a custom CMS page with layered navigation.

For this example, the custom page's URL is /onsale/index/display, and it is filtered by the 'onsale' attribute. Modify the Model/Layer.php file to make it use whatever attribute you want.

Known Issues

  • The Price filter does not display accurate product counts, even though the category filter does. For that reason, we modified the layer/view.phtml page to not display the Price filter.

  • The filters in the layered navigation module cannot be collapsed.