我安装了Magento的html5移动主题,作为手机的附加主题。我的主要/默认主题非常适合响应式设计,但不适用于移动设备,因此为手机增加了html5主题。我需要知道如何从类别页面的顶部删除我的静态块。任何帮助非常感谢。我希望静态块保留在网站上,但不是移动版本 - 否则我只是删除它们因此问题。我想知道我是否可以使用layout.xml文件来实现这一目标。如果您能提供帮助,请具体说明。
答案 0 :(得分:1)
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.
答案 1 :(得分:0)
请按照以下步骤操作:
复制:app\design\frontend\SITE-PACKAGE\SITE-YOUR_CUSTOM_TEMPLATE\template\catalog\category\view.phtml
粘贴:app\design\frontend\MOBILE-PACKAGE\MOBILE-YOUR_CUSTOM_TEMPLATE\template\catalog\category\view.phtml
现在,打开移动版view.phtml
:
删除以下代码:
<?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; ?>
添加:
<?php echo $this->getProductListHtml() ?>
希望它会对你有所帮助!