1

My module have product questions.

Now i want to display latest 5 question in dashboard using my custom module

enter image description here

How can i do this??

1 Answer 1

1

you have to rewrite this block to do it.

Mage_Adminhtml_Block_Dashboard

<global>
        <blocks>
            <adminhtml>
                <rewrite>
                    <dashboard>Spacename_Modulname_Block_Adminhtml_Dashboard</dashboard>
                </rewrite>
            </adminhtml>
        </blocks>
    </global>

below function add your template file and show your block

public function __construct()
    {
        parent::__construct();
        $this->setTemplate('dashboard/index.phtml');

    }
4
  • in index.phtml i can write only my code or i have to copy core phtml code than add my code?
    – Newbie
    Oct 27, 2015 at 9:48
  • core phtml + your code Oct 27, 2015 at 9:51
  • and in this block extends ?? Test_Module_Block_Adminhtml_Dashboard extends Mage_Adminhtml_Block_Dashboard ri8??
    – Newbie
    Oct 27, 2015 at 9:56
  • yes you are right Oct 27, 2015 at 9:59

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.