I refer to the docs at http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html#xml-manage-ref-block saying that this is one of the params possible for that class. I put it into a referenced container and a block below this one is showing it's content but not the logo.

        <block class="Magento\Theme\Block\Html\Header\Logo" name="logo">
                <argument name="logo_file" xsi:type="string">images/logo.png</argument>

Is there a way to show error messages about this?

Why is the argument not matching the functions in logo.php? It should be the way since the conventions in docs say that it should match the name of the arguments in a certain way.

  • Another way to do this would be to upload the logo in the admin, Stores-> Config-> Design-> Header-> Logo Image. This doesn't answer your question, but might solve your problem.
    – circlesix
    Jun 14, 2016 at 23:19
  • Thanks though it is more that I need to understand how to adjust a theme. Magento creator made it hard enough to get behind how to do it at all when one comes from the direction to create a webpage in html and php only. I always find myself in the situation to think if I do it all with a clean template or not because I will lose mag functions. But understanding the dev functions is pretty hard. Especially when it does not work. :) I now started to create a layout and simply use template files for filling the container. Just to get something done.
    – user789660
    Jun 14, 2016 at 23:38

1 Answer 1


I think the link is just there to show you the syntax of how to reference a block, not change the logo. I took a look at some code I got from this book https://www.packtpub.com/web-development/magento-2-development-cookbook and to set the file you need to use the setLogoFile() method, passing the file name in as a perimeter.

<referenceBlock name="logo">
    <action method="setLogoFile">
        <argument name="logo_file" xsi:type="string">images/logo.png</argument>
  • 1
    thanks for the tip. I think that method should do the same the code I used should have been done. Excetpt the method might be helpful. The action method is deprecated in the actual version of magento 2 it seems. At the end I ended up creating and using a simple template file. Might be not the best way but I run out of time. :/
    – user789660
    Jun 16, 2016 at 11:25
  • Didn't know that, I found this post magento.stackexchange.com/questions/86188/… which points to this file in the testing framework github.com/magento/magento2/blob/develop/dev/tests/static/… Good info.
    – circlesix
    Jun 16, 2016 at 15:28
  • Looks like good info but man... how much does one has to learn with magento? This is worse than typoscript and I was happy to leave typo3 behind. Now theme design is something worse where you have to know very specific commands and all. And you have to use them in order to not lose functionality. sigh
    – user789660
    Jun 17, 2016 at 11:11
  • 2
    It's like committing to a horrible relationship until it's wonderful. It seems silly the whole time, but there is that hope that one day it will be amazing.
    – circlesix
    Jun 17, 2016 at 15:28
  • lol Yeah... I never thought it will be that way when I started with magento/magento 2 :D
    – user789660
    Jun 21, 2016 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.