I am working in a marketplace extension and I need to use some blocks from adminhtml(backend blocks), Actually I want to use all blocks in handle to be used in the frontend by sellers to add their new products . I try to update current layout by :


but It doesn't work.

1 Answer 1


As far as I know, this layout handle will not be available during a frontend request, because Magento does not load layout XML out of app/design/adminhtml/*. See Mage_Core_Model_Layout_Update::getFileLayoutUpdatesXml:

$filename = $design->getLayoutFilename($file, array(
    '_area'    => $area,
    '_package' => $package,
    '_theme'   => $theme

So the layout update model consults the design package by asking it to locate a layout file. And one of the requirements is to specify the area (frontend|adminhtml). So early in the routing process we omit one of the two areas -- adminhtml handles will not be available on a frontend request.

An alternative approach would be to write your own layout update and add it to the frontend:

# File: app/code/local/Yournamespace/Yourmodule/etc/config.xml

And in that update, re-create the layout updates from your desired admin handle:

# File: app/design/frontend/[package]/[theme]/layout/yourmodule.xml
    <update handle="editor"/>
    <reference name="content">
        <block type="adminhtml/catalog_product_edit" name="product_edit"></block>
    <reference name="left">
        <block type="adminhtml/catalog_product_edit_tabs" name="product_tabs"></block>
    <reference name="js">
        <block type="adminhtml/catalog_product_edit_js" template="catalog/product/js.phtml" name="catalog_product_js"></block>
        <block type="core/template" template="catalog/wysiwyg/js.phtml"/>

Then you can call:


From your controller or wherever you're working. Just note that this probably won't work as expected, because of how many admin-specific dependencies there are to make the admin area work. If values are expected to be in the registry, they likely won't be set on the frontend. URLs might not resolve as you would expect.

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.