1

I have one previously installed extension which have 3 tabs already added , Now I want to add new tab below it , How can I achieve this . I want to add new tab regions .

 <adminhtml>
     <rewrite>
    <customer_edit_tabs>Netbiz_Post_Block_Adminhtml_Customer_Edit_Tabs</customer_edit_tabs>
     </rewrite>    </adminhtml>

I have gone through this but not able to figure out what should I place in place of .

I want to add new tab to aw_blog extension (add post view) .

Please suggest.

Thanksenter image description here

1

I have figured out a way to solve this issue, I am posting an answer so that it might be helpful to someone.

In my custom modules config.xml file I have added

<blocks>
            <post>
                <class>Netbiz_Post_Block</class>
            </post>
            <blog>
                <rewrite>
                    <manage_blog_edit_tabs>Netbiz_Post_Block_Adminhtml_Tabs</manage_blog_edit_tabs>
                </rewrite>
            </blog>
        </blocks>

here manage_blog_edit_tabs point towards the class file which is responsible for adding tabs (in my case AW_Blog_Block_Manage_Blog_Edit_Tabs class) . I have override the _beforeToHtml() method of that class to add new menu item.

<?php

class Netbiz_Post_Block_Adminhtml_Tabs extends AW_Blog_Block_Manage_Blog_Edit_Tabs
{
    protected $parent;

    protected function _beforeToHtml()
    {
            $this->parent =parent::_beforeToHtml();
            $this->addTab('regions_section', array(
            'label' => Mage::helper('blog')->__('Regions'),
            'title' => Mage::helper('blog')->__('Regions'),
            'content' => $this->getLayout()
                ->createBlock('post/adminhtml_post_form')->toHtml(),
        ));
        return parent::_beforeToHtml();
    }
}

This adds the new menu for me.

Hope this helps someone.

Your Answer

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

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