I'm trying to extend the topmenu.php block to make some modifications but it doesn't work for me.
I already created my custom module.
Can someone help me by explaining how I can do it?
First Of all, you need to assign your create block into the layout default.xml
<referenceContainer name="page.top">
<block class=“Vendor\Module\Block\Html\Topmenu" name="catalog.topnav" template="Magento_Theme::html/topmenu.phtml" before="-"/>
</referenceContainer>
I hope this is helpful to you!!