Add Custom menu collection in Magento 2

Posted on Leave a commentPosted in Magento 2

What do we do if we want to show our own menu collection than the traditional list of menu that comes from adding categories ? Simple just make Plugin for that. Assuming you all know how to declare your modules i will skip that part. app/code/Vendor/Menu/etc/di.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <type name=”Magento\Theme\Block\Html\Topmenu”> <plugin name=”catalogTopmenu” […]