0

I need to pass date-stamp in the format 20200513 in URL to homepage logo to ensure browser doesn't cache the logo and gets the latest logo whenever the logo switching recurs following a cron job meant for seasonal logos. Could you please show what change to be made in the code in my logo.phtml file as seen below to add the date to the URL?

<a class="logo" href="<?= $block->getUrl('') ?>" title="<?= /* @escapeNotVerified */ $storeName ?>">
<img src="<?= /* @escapeNotVerified */ $block->getLogoSrc() ?>" 
     title="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
     alt="<?= /* @escapeNotVerified */ $block->getLogoAlt() ?>"
     <?= $height_width_html ?>
/>

Your Answer

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

Browse other questions tagged or ask your own question.