0

In my custom module I have created app/code/myVendor/myModule/view/frontend/layout/customer_account_forgotpassword.xml . With below content I can see title is changing but form gets disappear instead of displaying the content in forgotpassword.phtml

<?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">
<head>
    <title>From my module</title>
</head>
<body>
    <referenceContainer name="content">
        <block class="Magento\Customer\Block\Account\Forgotpassword" name="forgotPassword" template="myVendor_myModule::form/forgotpassword.phtml">
            <container name="form.additional.info" as="form_additional_info"/>
        </block>
    </referenceContainer>
</body>
</page>

I have done upgrading, compiling, deploying and emptied the cache.

1

try below code under <body> tag of your xml file

<referenceContainer name="content">
     <referenceBlock name="forgotPassword">
         <action method="setTemplate">
             <argument name="template" xsi:type="string">myVendor_myModule::form/forgotpassword.phtml</argument>
         </action>
     </referenceBlock>
</referenceContainer>
  • I did, but No luck :( – Zinat Jan 8 '18 at 12:40
  • it should work , please confirm your template path and Namespace_Module name – Piyush Jan 8 '18 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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