frontName :frontName : aboutme; My Controller directory structure:
My Controller directory structure: Singh/Module1/Controller/Customer/Index.php.
I
I have created aboutme_customer_index.xmlaboutme_customer_index.xml also
class Index extends \Magento\Framework\App\Action\Action //implements AboutmeInterface
{ /** * @var PageFactory */ protected $resultPageFactory;
{
/**
* @var PageFactory
*/
protected $resultPageFactory;
/**
* @param Context $context
* @param PageFactory $resultPageFactory
*/
public function __construct(
Context $context,
PageFactory $resultPageFactory
) {
$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);
}
/**
* Customer order history
*
* @return \Magento\Framework\View\Result\Page
*/
public function execute()
{
/** @var \Magento\Framework\View\Result\Page $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->getTitle()->set(__('About Me'));
$block = $resultPage->getLayout()->getBlock('customer.account.link.back');
if ($block) {
$block->setRefererUrl($this->_redirect->getRefererUrl());
}
return $resultPage;
}
}
}