第一步:
找到
/app/design/frontend/default/default/template/page/html
复制header.phtml为另外一个文件,例如header2.html
第二步:
/app/design/frontend/default/default/layout
修改page.xml
你可以直接复制与header有关的Block并且把命题替换成上一步中你设定的
<block type="page/html_header2" name="header2" as="header2">
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
<block type="core/text_list" name="top.menu" as="topMenu"/>
</block>
第三步:
/app/code/core/Mage/Page/Block/Html
复制Header.php为Header2.php(同第一步)
第四步:
找到Header2.php中的部分代码(在头部),
class Mage_Page_Block_Html_Header extends Mage_Core_Block_Template
{
public function _construct()
{
$this->setTemplate(’page/html/header.phtml’);
}
修改成:
class Mage_Page_Block_Html_Header2 extends Mage_Core_Block_Template
{
public function _construct()
{
$this->setTemplate(’page/html/header2.phtml’);
}
- 浏览: 315664 次
- 性别:
- 来自: 上海
最新评论
-
bu123dian:
都没有中文了么?英文看起来真的比较费劲
JIRA Git Plugin -
haohappy2:
We can call it dynamic content ...
Varnish and Nginx -
spidersea:
文中提到“利用 Varnish cache 减少了90%的数据 ...
Varnish and Nginx
How to add new header of Magento page
- 博客分类:
- magento
相关推荐
new methods introduced in the Magento 2 framework and examples on how to create basic functions. Chapter 8, Creating Magento 2 Extensions – Advanced, explains how to use advanced features in ...
Chapter 1, Installing Magento 2 on Apache and NGINX, is a...new methods introduced in the Magento 2 framework and examples on how to create basic functions. Chapter 8, Creating Magento 2 Extensions – Ad
magento处理不同的头部header
Apress.The.Definitive.Guide.to.Magento.Dec.2009.pdf Apress于2009重磅推出的Magento上手书籍,原书地址:http://www.apress.com/book/view/9781430272298
Ability to place any block in any position by easily changing CMS page layout Unlimited number of blocks inside each position Unlimited number of content items inside each block Block items can ...
magento入门原版书.。。The Definitive Guide to Magento.pdf
You’ll start by getting a general understanding of what Magento is, why and how you should use it, and whether it is possible and feasible to migrate from an old web store to Magento 2. As you work ...
Get a detailed insight into the structure of Magento Learn about event/observer-driven modules Get a hands-on introduction to custom shipping and payment methods ☆ 出版信息:☆ [作者信息] Branko ...
Ajax-Magento-ajax-add-to-cart.zip,[模块magento 1]magento ajax添加到购物车-ajoter vos produits au panier en ajax/感谢ajax将您的产品添加到购物车,ajax代表异步javascript和xml。它是多种web技术的集合,包括...
magento数据结构分析 magento数据字典
两本关于Magento的点子书 希望大家喜欢 Apress.The.Definitive.Guide.to.Magento.Dec Magento 1.3 Theme Design
magik shoes magento 模板, magento 1.7 模板
magento的SMTP插件magento的SMTP插件magento的SMTP插件
深入理解Magento 由精东博客下载下来制作成pdf
Guide to Programming with magento.pdf。编程手册
Magento插件开发手册 Magento Extension Developers Guide
Athlete Magento主题,兼容Magento 1.9.x, 1.8.x, 1.7.x ,特点:完全自适应(响应式布局),自定义子主题,无限颜色,完全自定义,一键安装演示,小工具化横幅系统,颜色选择,MEGA菜单,多商店支持,自定义产品...
Magento Magento商城 Magento目录结构
magento2 developers cookbook, magento 开发手册,magento教程