I'm using Magento 1.9 and struggling on one thing. I have a CMS block in my category page but I want it to show only on the first page! So if I scroll down and move to page 2 on the same category I don't want to see that CMS block again. I tried to put this code in the CMS block... but it ignores me (category-accordion.accordion is the main div of the CMS block)
I changed the catalog/category/view.phtml as follows but it seems that Magento checks the condition only in the first page because it keeps the block on all the other pages...
I'm using Magento 1.9 and struggling on one thing. I have a CMS block in my category page but I want it to show only on the first page! So if I scroll down and move to page 2 on the same category I don't want to see that CMS block again. I tried to put this code in the CMS block... but it ignores me (category-accordion.accordion is the main div of the CMS block)
I changed the catalog/category/view.phtml as follows but it seems that Magento checks the condition only in the first page because it keeps the block on all the other pages...
if($this->isContentMode()) {
echo $this->getCmsBlockHtml();
}
else if($this->isMixedMode() && strpos($_SERVER['REQUEST_URI'], '?=p') == false) {
echo $this->getCmsBlockHtml();
echo $this->getProductListHtml();
}
else {
echo $this->getProductListHtml();
}