3

Example.com/customer/account/login/

This page contains three Templates

  1. Sociallogin.phtml
  2. Login.phtml
  3. Newcustomer.phtml

I know where these files are located.But i don't know where these files are combined and how these files are shown in a single page.I want to change position of social login buttons into login box.

Login page image

1 Answer 1

0

Seems its a custom theme. I am giving you an example of default magento2 installation.But you will get the whole idea. So first you need to check the url in magento2. Here the url is

Example.com/customer/account/login/

So you need to find the layout handler name customer_account_login.xml file. Because unlike magento1 here every handler has its own .xml file.

Now because of the sake of module structure you can find it inside Magento_Customer module . File path would be this Magento\Customer\view\frontend\layout. Now when you will open the file you will see this below code.

<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">
            <!-- customer.form.login.extra -->
            <container name="customer.login.container" label="Customer Login Container" htmlTag="div" htmlClass="login-container">
                <block class="Magento\Customer\Block\Form\Login" name="customer_form_login" template="Magento_Customer::form/login.phtml">
                    <container name="form.additional.info" as="form_additional_info"/>
                </block>
                <block class="Magento\Customer\Block\Form\Login\Info" name="customer.new" template="Magento_Customer::newcustomer.phtml"/>
            </container>
            <block class="Magento\Cookie\Block\RequireCookie" name="require-cookie" template="Magento_Cookie::require_cookie.phtml">
                <arguments>
                    <argument name="triggers" xsi:type="array">
                        <item name="loginButton" xsi:type="string">.action.login</item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceContainer name="form.additional.info">
            <block class="Magento\Framework\View\Element\Template" name="form_additional_info_customer" template="Magento_Customer::additionalinfocustomer.phtml"/>
        </referenceContainer>
    </body>
</page>

Here you will find the 2 files which is showing in that page which are login.phtml and newcustomer.phtml. Both you can find inside the customer.login.container.

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.