0

On the frontend, I can successfully add a block using this layout update for my module:

<?xml version="1.0"?>
<layout version="0.1.0">
    <customer_address_form translate="label">
        <reference name="my.account.wrapper">
            <block type="core/template" name="customer_address_edit" template="customer_address_edit.phtml" after="customer_address_edit"></block>
        </reference>
    </customer_address_form>
</layout>

And then my customer_address_edit.phtml is rendered just fine...

However, on the admin side I'm having trouble. I'm trying to add a block in a similar way, to the New Order page. My layout file looks like this:

<?xml version="1.0"?>
<layout version="0.1.0">
    <adminhtml_sales_order_create_index>
        <reference name="order_item_extra_info">
            <block type="adminhtml/template" name="admin_order_create" template="admin_order_create.phtml"></block>
        </reference>
    </adminhtml_sales_order_create_index>
</layout>

I've tried a couple variations of that, like using core/template and setTemplate. I just want a block to be added where I can add some custom HTML or JavaScript in a phtml file. Does anyone know what's different about adding a new phtml block to admin vs frontend?

UPDATE: This layout worked (before_body_end):

<?xml version="1.0"?>
<layout version="0.1.0">
    <adminhtml_sales_order_create_index>
        <reference name="before_body_end">
            <block type="adminhtml/template" name="admin_order_create" template="admin_order_create.phtml"></block>
        </reference>
    </adminhtml_sales_order_create_index>
</layout>

1 Answer 1

1

This layout worked (before_body_end):

<?xml version="1.0"?>
<layout version="0.1.0">
    <adminhtml_sales_order_create_index>
        <reference name="before_body_end">
            <block type="adminhtml/template" name="admin_order_create" template="admin_order_create.phtml"></block>
        </reference>
    </adminhtml_sales_order_create_index>
</layout>

Your Answer

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

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