1

I need to add an extra, static image in the page header. Right after the logo.

My child theme directory structure in [magento project root]/app/design/frontend/My_Vendor/My_Theme/

  ├── Magento_Theme
  │   └── templates
  │       └── html
  │           └── header
  │               └── logo.phtml
  │               
  ├── media
  │   └── preview.png
  ├── registration.php
  ├── theme.xml
  └── web
      └── images
          ├── logo.png
          └── CUSTOM_TAGLINE.png

The CUSTOM_TAGLINE.png is missing in the static files, the rest works fine.

The symlinks to images are being generated in a static folder [magento project root]/pub/static/frontend/My_Vendor/My_Theme/my_language/images/. My custom logo.png appears there along with loader-1.gif which I assume comes from the parent theme. Unfortunately my custom image CUSTOM_TAGLINE.png is not there.

In my modified Magento_Theme/templates/html/header/logo.phtml I have the line echo $block->getViewFileUrl('images/CUSTOM_TAGLINE.png') that also works as expected, printing the path to the generated static folder.

What do I miss here? Do I need to declare the CUSTOM_TAGLINE.png somehow?

0

It worked! I don't know what I did that I haven't done before but the CUSTOM_TAGLINE.png symlink appeared along with few other files. If you have similar problems just make sure to cache:flush and grunt refresh (if you use grunt). I suspect that was one of those.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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