0

Using magento 2.2, admin. I had create new page that include tabs like in image below. My show wrong design, so I need to remove it part.

CODE ADD TAB:

class Tabs extends \Magento\Backend\Block\Widget\Tabs
{

    /**
     * 
     * {@inheritDoc}
     * @see \Magento\Framework\View\Element\Template::_construct()
     */
    protected function _construct()
    {
        parent::_construct();
        $this->setId('notification_tabs');
        $this->setTitle(__('Notification'));
    }

    /**
     * 
     * {@inheritDoc}
     * @see \Magento\Framework\View\Element\AbstractBlock::_prepareLayout()
     */
    protected function _prepareLayout()
    {
        $this->addTab('notification_customer', [
            'label' => __('Customer')
        ]);
        $this->addTab('notification_driver', [
            'label' => __('Driver')
        ]);
        return parent::_prepareLayout();
    }
}

LAYOUT

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" layout="admin-2columns-left">
    <body>
        <referenceContainer name="left">
            <block class="Iota\EShopping\Block\Adminhtml\Notification\Tabs"
                name="iota_eshopping_notification_tabs">
            </block>
        </referenceContainer>
        <referenceContainer name="content">
            <block class="Iota\EShopping\Block\Adminhtml\Notification\View"
                name="iota_eshopping_notification" template="Iota_EShopping::notification/view.phtml" />
        </referenceContainer>
    </body>
</page>

IMAGE

enter image description here

Your Answer

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

Browse other questions tagged or ask your own question.