1

I would like to add a banner image and some contents to default create customer account page at www.domain.com/customer/account/create/, how do i do it? Or Can I add a CMS Page or static block to it?

2 Answers 2

3

As per my opinion easiest way is the use of widget.

Create a static block with content you want to show.

Now create a widget with:

Type : CMS static Block

Display On : Specific Page

Page: Customer Account Registration Form

Container choose from available

Hope above will help!

2
  • this works great, thank you! Mar 26, 2019 at 19:32
  • welcome @KrisWen :)
    – Pawan
    Mar 27, 2019 at 2:49
2

app/design/frontend/Vendor/themename/Magento_Customer/layout/customer_account_create.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <!-- PHTML -->
            <block class="Magento\Framework\View\Element\Template" name="my.customer.informations" template="Magento_Customer::html/extra_informations.phtml" before="customer_form_register" />
            <!-- BLOCK CMS -->
            <block class="Magento\Cms\Block\Block" name="customer.extra.info" before="customer_form_register">
                <arguments>
                    <argument name="block_id" xsi:type="string">info</argument> <!--info = cms block identifier -->
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

app/design/frontend/Vendor/themename/Magento_Customer/templates/html/extra_informations.phtml

<?= __("Here is my content, cool !"); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.