开发者

How to Change page Title of Magento Module?

I have successfully install magento, but site title remain magento, I try many tim开发者_Python百科es 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>

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

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

grep for more references:

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


Put this function in Block page of that Module

public function _prepareLayout()  
{  
    $this->pageConfig->getTitle()->set(__('Your Page Title'));  
    return parent::_prepareLayout();  
}  
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜