I have created a custom module. When we click on the admin grid to edit, it opens edit page. In that I am showing tabs. When I click on that tab I need to show template file. If you see the below screen you can get idea
this is my tab file
<?php
/**
/**
* Exinent_Customerids Module
*
* @category customer
* @package
* @author pawan
*
*/
namespace Vendor\Modulename\Block\Adminhtml\Customerids\Edit\Tab;
/**
* customerid post edit form main tab
*/
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Registry;
class Meat extends \Magento\Backend\Block\Template
{
// const IBAN_TEMPLATE = 'Exinent_Customerids::test.phtml';
protected $_template = 'test.phtml';
protected $_coreRegistry = null;
// public function __construct(
// \Magento\Backend\Block\Widget\Context $context,
// array $data = []
// ) {
// parent::__construct($context, $data);
// }
// protected function _prepareLayout()
// {
// parent::_prepareLayout();
// if (!$this->getTemplate()) {
// $this->setTemplate(static::IBAN_TEMPLATE);
// }
//
// return $this;
// }
}
my layout file
<block class="Vendor\Modulename\Block\Adminhtml\Customerids\Edit\Tab\Meat" name="customerids_customerids_edit_tab_meat"/>
<arguments>
<argument name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">customerids_customerids_edit_tab_meat</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="opened" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="string">2</item>
<item name="canShow" xsi:type="boolean">true</item>
<item name="componentType" xsi:type="string">fieldset</item>
</argument>
</arguments>