繁体   English   中英

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

[英]Add custom phtml /block to regiration page magento

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

我建议为您的模块创建一个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>

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM