Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7894657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:27:07+00:00 2026-06-03T07:27:07+00:00

Im currently trying to simply add a block to a custom Adminhtml module. i

  • 0

Im currently trying to simply add a block to a custom Adminhtml module. i am able to display the content of the block but it renders right at the top of the page with a grey background, and then the standard magento layout with the design and menu renders directly underneath it.

im trying to do things in the correct fashion as to learn best practises and am following books and tutorials as well as the magento core but so far have been unable to add content correctly.

so far i have :

public function indexAction()
{
    $this->loadLayout();
    $this->_setTitle();
    $main_block = new Invent_General_Block_Info();
    echo $main_block->toHtml();
    //$this->_addContent($main_block);
    $this->renderLayout();

i can see the general way to do so in the Mage Core would be something like

/**
  * Append customers block to content
  */
    $this->_addContent(
        $this->getLayout()->createBlock('adminhtml/customer', 'customer')
    );

since i have already created the block $main_block it doesnt make sense to me to ->createBlock and so im not sure what to do from here.

any assistance is appreciated as usual. thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:27:08+00:00Added an answer on June 3, 2026 at 7:27 am

    I have found an answer that solved this problem.

    of course it would come from Alan Storm. Thanks Alan. the thread is found here!

    so to solve this, all i did was :

    create a folder in app/design/adminhtml/mythemename/info.phtml

    and then in my controller action i simply did :

    $this->loadLayout();
        $this->_setTitle();
     $this->_addContent($this->getLayout()->createBlock('adminhtml/template')->setTemplate('shipment/info.phtml'));
        $this->renderLayout();
    

    and it works great.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to implement a simple Add-In for InfoPath 2010 Filler/Editor mode, which
Currently trying at add ajax to a site, after much reading I discovered that
I'm currently trying to add an MSChart to a partial view in ASP.NET MVC
I'm currently trying to add gridlines to a canvas. I need an exact free
I am currently trying to add 301 redirect to my routes in MVC to
I'm currently trying to add an admin mode to my cakephp site. I followed
I'm currently working on a small social networking application and right now I'm trying
I'm trying to add ad-hoc discovery to a simple WCF service-client setup (currently implemented
I'm learning domain driven design. I am currently trying to write a simply application
I am currently trying to simply insert a new row into my SQLite3 database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.