0

I've created an additional, static navigation that features a few links to important pages on our Magento website. It's a little nasty, but here's how it's coded:

<?php
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
$url = Mage::getSingleton('core/url')->parseUrl($currentUrl);
$path = $url->getPath();
?>
<ul class="full-width-offer-strip">
  <li><a class="button <?php if (strpos($path,'item1') !== false) { echo 'active'; } ?>" href="<?php echo Mage::getBaseUrl(); ?>item1">Item 1</a></li>
  <li><a class="button <?php if (strpos($path,'item2') !== false) { echo 'active'; } ?>" href="<?php echo Mage::getBaseUrl(); ?>item2">Item 2</a></li>
  <li><a class="button <?php if (strpos($path,'item3') !== false) { echo 'active'; } ?>" href="<?php echo Mage::getBaseUrl(); ?>item3">Item 3</a></li>
</ul>

Every so often I notice that when I'm on one of these pages there's another page also marked with the class active. As soon as I flush the Magento cache it goes away and functions as it should. Is it possible that Magento is caching the static block of another users active page, somehow?

4

0

Your Answer

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

Browse other questions tagged or ask your own question.