Let’s initiate a discussion!!
You can check a list of called layout XML for specific pages by Magento\Framework\App\View class.
Call getLayout() method from Magento\Framework\App\View.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.
1 2 3 |
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $xmlLayout = $objectManager->get(\Magento\Framework\App\View::class); var_dump($xmlLayout->getLayout()->getUpdate()->getHandles()); |
To check for a specific page, You need to call the function as below:
1 2 3 4 5 |
public function __construct( \Magento\Framework\App\ViewInterface $view ) { $this->view = $view; } |
Call Inside a function,
$loadedHandles = $this->view->getLayout()->getUpdate()->getHandles();
Now you can print the result $loadedHandles from above expression.
[crayon-641ef95df1424496749149/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
We will create a new category page layout and use...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.