A module to add products to Magento 2's topmenu
|
<?xml version="1.0" encoding="UTF-8"?> |
|
<!-- |
|
/** |
|
* @author: Daan van den Bergh |
|
* @url: https://daan.dev |
|
* @package: Dan0sz/TopmenuProducts |
|
* @copyright: (c) 2019 Daan van den Bergh |
|
*/ |
|
--> |
|
<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="dan0sz_topmenu_products_gethtml_before" instance="Dan0sz\TopmenuProducts\Observer\TopmenuGetHtmlBefore" /> |
|
</event> |
|
</config> |
|
<?xml version="1.0" encoding="UTF-8"?> |
|
<!-- |
|
/** |
|
* @author: Daan van den Bergh |
|
* @url: https://daan.dev |
|
* @package: Dan0sz/TopmenuProducts |
|
* @copyright: (c) 2019 Daan van den Bergh |
|
*/ |
|
--> |
|
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> |
|
<module name="Dan0sz_TopmenuProducts" setup_version="1.0.0"> |
|
<sequence> |
|
<module name="Magento_Catalog" /> |
|
</sequence> |
|
</module> |
|
</config> |
|
<?php |
|
/** |
|
* @author: Daan van den Bergh |
|
* @url: https://daan.dev |
|
* @package: Dan0sz/TopmenuProducts |
|
* @copyright: (c) 2019 Daan van den Bergh |
|
*/ |
|
|
|
\Magento\Framework\Component\ComponentRegistrar::register( |
|
\Magento\Framework\Component\ComponentRegistrar::MODULE, |
|
'Dan0sz_TopmenuProducts', |
|
__DIR__ |
|
); |