首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何从Magento中的类别页中删除自定义块

如何从Magento中的类别页中删除自定义块
EN

Stack Overflow用户
提问于 2013-10-18 10:47:59
回答 2查看 2.2K关注 0票数 0

我已经安装了Magento的html5移动主题作为一个额外的主题仅为手机。我的主/默认主题是伟大的响应设计,但不是移动,因此增加了html5主题的手机。我需要知道如何从我的类别页面顶部删除我的静态块。任何帮助都非常感谢。我希望静态块保持在站点上,而不是在移动版本上--否则我会简单地删除它们,这就是问题所在。我想知道是否可以使用一个layout.xml文件来实现这一点。如果你能帮忙的话,请具体一点。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-10-18 12:51:15

遵循以下步骤:

副本: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

删除以下代码:

代码语言:javascript
复制
<?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; ?>

添加:

代码语言:javascript
复制
<?php echo $this->getProductListHtml() ?>

希望它能帮到你!

票数 0
EN

Stack Overflow用户

发布于 2013-12-05 10:20:25

代码语言:javascript
复制
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
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19447802

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档