We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    You can check a list of called layout XML for specific pages by MagentoFrameworkAppView class.

    Call getLayout() method from MagentoFrameworkAppView.php class.

    getLayout()->getUpdate()->getHandles() is used for getting all the handles of a page.

    You need to add the following code at the end of root index.php file to check XML files.

    $objectManager = MagentoFrameworkAppObjectManager::getInstance();
    $xmlLayout = $objectManager->get(MagentoFrameworkAppView::class);
    var_dump($xmlLayout->getLayout()->getUpdate()->getHandles());

    To check for a specific page, You need to call the function as below:

    public function __construct(
        MagentoFrameworkAppViewInterface $view
    ) {
        $this->view = $view;
    }

    Call Inside a function,
    $loadedHandles = $this->view->getLayout()->getUpdate()->getHandles();

    Now you can print the result $loadedHandles from above expression.

    Fill the below form if you need any Magento relate help/advise/consulting.

    With Only Agency that provides a 24/7 emergency support.

      Get a Free Quote