I have created a custom module using UI_COMPONENT. Everything worked properly, but unable to set the Page Title.
Index layout file:
<?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>Test</title>
</head>
<body>
<referenceContainer name="content">
<uiComponent name="testing_item_grid"/>
</referenceContainer>
</body>
</page>
Adding Solution: In Adminhtml Controller prepend your title text.
Here is the code:
namespace Testing\test\Controller\Adminhtml\Index;
use Magento\Framework\Controller\ResultFactory;
use Magento\Backend\App\Action;
class Index extends Action{
public function execute() {
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
$resultPage->getConfig()->getTitle()->prepend(__(" Custom Grid"));
return $resultPage;
}
}