Reputation: 13
I have Magento's html5 mobile theme installed as an additional theme just for mobiles. My main/default theme is great for responsive designs but not for mobile hence the addition of the html5 theme for mobiles. I need to know how to remove my static blocks from the top of my category pages. Any help greatly appreciated. I want the static blocks to remain in place on the site, but not on the mobile version - otherwise I'd simply remove them hence the question. I was wondering if I could use a layout.xml file to achieve this. Please be specific if you can help.
Upvotes: 0
Views: 2363
Reputation: 688
Using template path hints you can easily find your template path files.
Login to admin pannel and under
- System -> Configuration
- Change the “Configuration Scope” to “Default Store View” (or whichever store view you want to see template paths on)
- Under Advanced in the left menu click Developer
- Click “Debug” to expand that section
- Change “Template Path Hints” to "Yes"
- Click Save Configuration
Now to refresh the front-end and see all the locations of the template files so you can easily modify the correct ones.
Hope it will helps you.
Upvotes: 1
Reputation: 1869
Follow these steps:
Copy: app\design\frontend\SITE-PACKAGE\SITE-YOUR_CUSTOM_TEMPLATE\template\catalog\category\view.phtml
Paste: app\design\frontend\MOBILE-PACKAGE\MOBILE-YOUR_CUSTOM_TEMPLATE\template\catalog\category\view.phtml
Now, open mobile version view.phtml
:
Remove below code:
<?php if($this->isContentMode()): ?>
<?php echo $this->getCmsBlockHtml() ?>
<?php elseif($this->isMixedMode()): ?>
<?php echo $this->getCmsBlockHtml() ?>
<?php echo $this->getProductListHtml() ?>
<?php else: ?>
<?php echo $this->getProductListHtml() ?>
<?php endif; ?>
Add:
<?php echo $this->getProductListHtml() ?>
Hope it will help you!
Upvotes: 0