0

嗨,我想使用 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

4

1 回答 1

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>

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

于 2013-02-12T07:55:06.800 回答