Get list of Layout XML called for a current page Magento 2.

You can get 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() used for getting all the handles of a page.

You need to keep below code at the end of root index.php file to check XML files. Continue reading “Get list of Layout XML called for a current page Magento 2.”

How to add external CSS and JS Url in Magento2?

You can add External third-party JS,CSS, and fonts URL using Magento 2 by XML at below way, All the Url will be staying in  <head> tag. Pass Second attribute as  src_type=”url”

For set third-party JS link,

For set third-party CSS link,

For set font link,

For Remove link from the page,  If you want to remove specific JS or CSS from the specific page you can use <remove> tag under the <head> to remove from a specific page.