,我不知道有任何功能了,它允許您指定產品評論網頁不同的標題框的。我可能是錯的,但?
所以,這留下了兩種方法可以用來實現這一點。
- 核心區塊覆蓋
- 事件/觀察員
我會選擇在這裏選擇2。即使有了這個選項,仍然有不同的方法來實現這一點。這裏是其中之一......
所以,一旦你創建你的模塊,你就需要聲明觀察者在你的config.xml:
<?xml version="1.0"?>
<config>
<!-- other config xml -->
<frontend>
<events>
<controller_action_layout_render_before_review_product_list>
<observers>
<productmeta>
<class>YourCompany_YourModule_Model_Observer</class>
<method>controller_action_layout_render_before_review_product_list</method>
</productmeta>
</observers>
</controller_action_layout_render_before_review_product_list>
</events>
</frontend>
<!-- other config xml -->
</config>
那麼你的觀察員將與此類似。 ..
<?php
class YourCompany_YourModule_Model_Observer
{
/**
* @pram Varien_Event_Observer $observer
* @return void
*/
public function controller_action_layout_render_before_review_product_list(Varien_Event_Observer $observer)
{
$title = "Your new page title";
Mage::app()->getLayout()->getBlock('head')->setData('title', $title);
}
}