Magento是一个电子商务体系,其SEO功效壮大,而且产品的分类题目等信息可以在后台随时进行更改,不能修正的信息通过Magento后台代码进行修正。那么,你会在Magento修正页面题目吗?具体流程如下:
找到app/design/frontend/your_package/your_theme/template/page/html/head.phtml文件夹。将<title><?php echo $this->getTitle() ?></title>
改为<title><?php echo ($this->getMyTitle()) ? Mage::getStoreConfig('design/head/title_prefix').' '.$this- >getMyTitle().' '.Mage::getStoreConfig('design/head/title_suffix') : $this->getTitle(); ?></title>
查找customer.xml的layout文件,以登陆页面题目为例:
<customer_account_login translate="label">
<label>Customer Account Login Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
</reference>
<!-- New reference for page title starts -->
<reference name="head">
<action method="setMyTitle" translate="title"><title>Buyer
Login</title></action>
</reference>
<!-- // New reference for page title ends -->
</customer_account_login>
详情可添加微信好友,获取相关业务资料。