将自定义phtml /块添加到注册页面magento

时间:2013-02-12 07:19:19

标签: magento magento-1.7

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

<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>

我想在我的网站注册页面末尾显示我的页面。感谢adanace

1 个答案:

答案 0 :(得分:2)

我建议为你的模块创建一个layout.xml文件。

首先,您需要在模块的config.xml中定义此文件:

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

然后在:design / frontend / base / defualt / layout

下创建此布局文件
<?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>

然后应该在注册页面的末尾添加您的模块。

相关问题