cancel
Showing results for 
Search instead for 
Did you mean: 

Override logo.php

Override logo.php

Hi,

 

I am trying to override the logo.php and logo.phtml block in the html/header folder.

 

I have created copies of the files from another theme, modified the di.xml to reference the namespace of the files in my theme.

 

I have managed to successfully to a similar override to the topmenu.php and topmenu.phtml components, but following the same pattern is not working for the logo.

 

Is there something different about these I should know?

 

di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Theme\Block\Html\Topmenu" type="Russ\TopNav\Block\Topmenu" />
    <preference for="Magento\Theme\Block\Html\Header\Logo" type="Russ\TopNav\Block\Header\Logo" />
</config>