如何更改Magento模块的页面标题? [英] How to Change page Title of Magento Module?

查看:65
本文介绍了如何更改Magento模块的页面标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功安装了magento,但是网站标题仍然是magento,我尝试了很多次,但是没有更改该标题?也没有更改该小部件下的内容?那么程序是什么呢?

I have successfully install magento, but site title remain magento, I try many times but did not change that title?and did not change thing under the widget? so what is the procedures?

推荐答案

您可以通过布局文件来实现:

you can do it via layout files:

<reference name="head">
    <action method="setTitle" translate="title"><title>Your Title</title></action>
</reference>

或通过访问头块元素并在其上调用setTitle('your title')方法通过代码

or via code by accessing head block element and calling setTitle('your title') method on it

$this->getLayout()->getBlock('head')->setTitle('your title'); 

grep以获取更多参考:

grep for more references:

grep '>setTitle(' app/code/ -rsn

这篇关于如何更改Magento模块的页面标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆