Skip to content

Instantly share code, notes, and snippets.

@aneesahmadweb
aneesahmadweb / Anatomy of Magento 2: Layered Navigation.md
Created November 2, 2023 12:39 — forked from ProcessEight/Anatomy of Magento 2: Layered Navigation.md
In-depth exploration of how layered navigation is implemented in Magento 2

Anatomy of Magento 2: Layered Navigation

Points for investigation

  • Generate high-level overview of all the main components
  • How are the total item counts for each option generated?
  • How is the catalog updated to display the matching products?
  • How are options rendered?
  • What are the customisation points?
  • What events are dispatched?
<?php
class AW_Blog_MyController extends Mage_Core_Controller_Front_Action
{
public function preDispatch(){
$this->loadLayout();
echo $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
$this->renderLayout();