magento给首页定义不同的header及topmenu的方法

一个很简单的方法可以实现
登录magento后台管理系统,选择CMS –> Pages –> Home Page –> Design,在Update Layout Xml中填入
[php]
<reference name="header">
<action method="setTemplate"><template>page/html/header2.phtml</template></action>
</reference>
<reference name="top.menu">
<block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top2.phtml"/>
</reference>
[/php]
然后将修改好的模板header2.phtml及top2.phtml放入相应位置,刷新缓存,这样首页就会显示不同于其他页面的header及topmenu了!

标签


Warning: error_log(/www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/#log/log-0216.txt): failed to open stream: No such file or directory in /www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/spider.class.php on line 2900