Magento 菜单加上首页比较简单,\magento\app\design\frontend\base\default\template\catalog\navigation\top.phtml
打开top.phtml
<ul id="nav">
<?php echo $_menu; ?>
</ul>
改成
<ul id="nav">
<li><a href="<?php echo $this->getBaseUrl() ?>"><span>首页</span></a></li>
<?php echo $_menu; ?>
</ul>
就是添加了一个首页的li。
给top link加首页的话,要在customer.xml里修改,把49行的
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
</reference>
</default>
改成
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Home</label><url></url><title>Home</title><prepare>true</prepare><urlParams/><position>5</position></action>
<action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
</reference>
</default>
(责任编辑:最模板) |