0

I created new action in customer account controller

app/code/core/Mage/Customer/controllers/AccountController.php

public function createotpAction()
    {
         $this->loadLayout();
          $this->renderLayout();
    }

define layout

app/design/frontend/default/default/layout/local.xml
< ?xml version="1.0"?>
<layout version="0.1.0">
<customer_account_createotp>
    <reference name="content">
            <block type="core/template" name="customer_form_otp" template="customer/form/otp.phtml">
        </reference>
</customer_account_createotp>
</layout>

define content with phtml

app/design/frontend/base/default/template/customer/form/otp.phtml
<?php
    echo 'hello';
?>

when i enter url

magento/customer/account/createotp/

in display theme page with blank content enter image description here

can anyone help me to solve this issue
Thanks in advance for help

  • Is it echo'ing from that controller action? – MagePsycho Jan 17 '16 at 13:38
  • @MagePsycho in phtml file – Dinesh Jan 17 '16 at 13:42
  • Try to echo in createotpAction() method of your controller I mean. – MagePsycho Jan 17 '16 at 13:43
  • @MagePsycho I already tried, if i echo without loadLayout & renderLayout function it print string on blank screen which is ok, issue is with loading lauout – Dinesh Jan 17 '16 at 13:48
  • 1
    Determine what layout handles are in fact being created. You can use this extension from alan storm for this. github.com/astorm/LayoutViewer although it is superseded by commerce bug, it still works standalone. – ProxiBlue Jan 17 '16 at 14:06

Your Answer

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

Browse other questions tagged or ask your own question.