/**
  * prepare the layout
  *
  * @access protected
  * @return Ibrams_CmsExtended_Block_Adminhtml_Cmspage_Tree
  * @author Ultimate Module Creator
  */
 protected function _prepareLayout()
 {
     $addUrl = $this->getUrl("*/*/add", array('_current' => true, 'id' => null, '_query' => false));
     $this->setChild('add_sub_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ibrams_cmsextended')->__('Add Child Cmspage'), 'onclick' => "addNew('" . $addUrl . "', false)", 'class' => 'add', 'id' => 'add_child_cmspage_button', 'style' => $this->canAddChild() ? '' : 'display: none;')));
     $this->setChild('add_root_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ibrams_cmsextended')->__('Add Root Cmspage'), 'onclick' => "addNew('" . $addUrl . "', true)", 'class' => 'add', 'id' => 'add_root_cmspage_button')));
     return parent::_prepareLayout();
 }
 /**
  * prepare the layout
  *
  * @access protected
  * @return Ibrams_CmsExtended_Block_Adminhtml_Cmspage_Edit_Form
  * @author Ultimate Module Creator
  */
 protected function _prepareLayout()
 {
     $cmspage = $this->getCmspage();
     $cmspageId = (int) $cmspage->getId();
     $this->setChild('tabs', $this->getLayout()->createBlock('ibrams_cmsextended/adminhtml_cmspage_edit_tabs', 'tabs'));
     $this->setChild('save_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ibrams_cmsextended')->__('Save Cmspage'), 'onclick' => "cmspageSubmit('" . $this->getSaveUrl() . "', true)", 'class' => 'save')));
     // Delete button
     if (!in_array($cmspageId, $this->getRootIds())) {
         $this->setChild('delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ibrams_cmsextended')->__('Delete Cmspage'), 'onclick' => "cmspageDelete('" . $this->getUrl('*/*/delete', array('_current' => true)) . "', true, {$cmspageId})", 'class' => 'delete')));
         $this->addAdditionalButton("preview", array('label' => Mage::helper('ibrams_cmsextended')->__('Preview Cmspage'), 'onclick' => "cmspagePreview('" . $this->getUrl('*/*/preview', array('_current' => true)) . "', true, {$cmspageId})", 'class' => 'save'));
     }
     // Reset button
     $resetPath = $cmspage ? '*/*/edit' : '*/*/add';
     $this->setChild('reset_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('ibrams_cmsextended')->__('Reset'), 'onclick' => "cmspageReset('" . $this->getUrl($resetPath, array('_current' => true)) . "',true)")));
     return parent::_prepareLayout();
 }