标签:hello 文件 xml配置 public html xtend eth name htm
app\code\core\Mage\Customer\Block\Form\Register1.php
class Mage_Customer_Block_Form_Register1 extends Mage_Directory_Block_Data{
public function getHello(){
return "Hello Block";
}
}
app\design\frontend\default\default\template\customer\form\register1.phtml
Html代码:
<?php echo $this->getHello(); ?>
将Xml代码
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml"/>
修改为:
<block type="customer/form_register1" name="customer_form_register1" template="customer/form/register1.phtml"/>
标签:hello 文件 xml配置 public html xtend eth name htm
原文地址:http://www.cnblogs.com/freeze89/p/6513942.html