0

is there a way to only get the filename of an Homepage logo in the logo.phtml template file? $block->getLogoSrc() in logo.phtml returns the URL to the logo, but I need only the filename like someimage.jpeg.

0

Just use the basename function <?= basename($block->getLogoSrc()) ?> to get the filename.

| improve this answer | |
  • Thank you. It helped. – CodeForGood May 7 at 22:57

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.