Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top