Last active
August 13, 2019 18:11
-
-
Save Dan0sz/a2219954b0e3894f361b7a37fe97d65b to your computer and use it in GitHub Desktop.
A module to add products to Magento 2's topmenu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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__ | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment