I'm trying to add one new template to customer account edit page using code below in my layout file

    <reference name="customer_edit">
        <block type="redbox/customer" name="linkedin_profile" template="redboxDigital_linkedin.phtml"/>

I want to include my template content above change password & Save button. How I can do that? I know I can over-write edit.phtml and add my code there but I don't prefer it.


Follow bellow steps

Step : 1 Add bellow code in your module layout file




<?xml version="1.0"?>
<layout version="0.1.0">
    <customer_account_edit translate="label">
        <reference name="customer_edit">
            <block type="redbox/customer" name="linkedin_profile" as="linkedin_profile" template="redbox/linkedin.phtml"/>

Step : 2 add bellow child block in file


<?php echo $this->getChildHtml('linkedin_profile');?>
| improve this answer | |
  • That helps. Isn't it possible to inject my template without modifying customer\form\edit.phtml at all ? – amitshree Feb 6 '16 at 9:53

It is possible to add your template file without modifying customer\form\edit.phtml. You have to use <update handle="customer_account_edit" /> in your layout file by specifying after="" or before="" for your template. you need to give alias in customer.xml file for that block.


| improve this answer | |

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.