src/module-elasticsuite-virtual-category/etc/frontend/events.xml
<?xml version="1.0"?>
<!--
/**
* Smile_ElasticsuiteVirtualCategory frontend event manager configuration.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @category Smile
* @package Smile\ElasticsuiteVirtualCategory
* @author Romain Ruaud <romain.ruaud@smile.fr>
* @copyright 2016 Smile
* @license Open Software License ("OSL") v. 3.0
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="page_block_html_topmenu_gethtml_before">
<observer name="fix-category-has-active" instance="Smile\ElasticsuiteVirtualCategory\Observer\Topmenu"/>
</event>
<event name="catalog_controller_category_init_after">
<observer name="fix-category-subtree-display-mode" instance="Smile\ElasticsuiteVirtualCategory\Observer\DisplaySubtreeCategoryAsProductOnly"/>
</event>
</config>