在里使用的加载phtml在方法。替代xml的作用

    技术2024-07-05  62

    1

    block

     $this->setChild('add_root_button',

                    $this->getLayout()->createBlock('adminhtml/widget_button')

                        ->setData(array(

                            'label'     => Mage::helper('catalog')->__('Add Root Category'),

                            'onclick'   => "addNew('".$addUrl."', true)",

                            'class'     => 'add',

                            'id'        => 'add_root_category_button'

                        ))

                );

    2

    controller中

    $this->_addContent($this->getLayout()->createBlock('gao/manage_gao_edit'))

    ->_addLeft($this->getLayout()->createBlock('gao/manage_gao_edit_tabs'));

     

    最新回复(0)