I'm working on a module in the admin part but can someone tell me please how I can load just my template from my controller without the admin menu in the left, the title and the footer.
here is one of my secondary controller :
<?php
namespace Mymodule\AdminPage\Controller\Adminhtml\Secondcontroller;
class Index extends \Magento\Backend\App\Action
{
/**
* @var \Magento\Framework\View\Result\PageFactory
*/
protected $resultPageFactory;
/**
* Constructor
*
* @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
*/
public function __construct(
\Magento\Backend\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
parent::__construct($context);
$this->resultPageFactory = $resultPageFactory;
}
public function execute()
{
return $resultPage = $this->resultPageFactory->create();
}
}
?>
and there is his the 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">
<head>
<title>
Module Mymodule
</title>
</head>
<body>
<referenceContainer name="content">
<block class="Magento\Backend\Block\Template" template="Mymodule_AdminPage::secondary.phtml"/>
</referenceContainer>
</body>
</page>