2013-02-12 67 views
0

您好我想添加我的自定义phtml文件或代码到注册页面使用magento.I找到注册的代码,但不知道我可以在哪里更新它。从customer.xml我得到这个代码添加自定义的phtml /块到群集页面magento

<customer_account_create translate="label"> 
     <label>Customer Account Registration 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_register" name="customer_form_register" template="customer/form/register.phtml"> 
       <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label"> 
        <label>Form Fields Before</label> 
       </block> 
      </block> 
     </reference> 
</customer_account_create> 

我的块码是

<module_index_index> 
     <reference name="content"> 
      <block type="module/module" name="module" template="module/module.phtml" /> 
     </reference> 
    </module_index_index> 

我想表明我在注册页面上我website.Thanks年底页面adanace

回答

2

我建议建立一个布局。 XML文件为您的模块。

首先,你需要在你的模块的config.xml来定义这个文件:

<frontend> 
    <layout> 
     <updates> 
      <your_module> 
       <file>your_module.xml</file> 
      </your_module> 
     </updates> 
    </layout> 
</frontend> 

然后在创建这个布局文件:设计/前端/基/ defualt /布局

<?xml version="1.0" encoding="UTF-8"?> 
<layout> 
    <customer_account_create> 
     <reference name="content"> 
      <block type="module/module" name="module" template="module/module.phtml" /> 
     </reference> 
    </customer_account_create> 
</layout> 

这应该在注册页面的末尾添加你的模块。

+0

感谢您的回复。我知道这种方式,但我想注册我的代码注册页面,当我想要,这可以通过编写更新xml注册在我的xml像()不在核心xml.Hope你得到了我的观点 – 2013-02-12 07:59:32

+0

这种方式会让核心xml文件不被编辑,你只需要用这几行创建你自己的xml文件。您的xml行将被添加到xml树中。这不是你想要的吗? – dmanners 2013-02-12 08:05:11

+0

对不起,你的回答是正确的。我已经解决了这个代码的问题。再次感谢 – 2013-02-12 09:15:43

相关问题