How to add Cms Page Custom Layout Update file in Magento 2.3.4?

From Magento 2.3.4, For the security enhancements, default custom layout update Textarea removed from the CMS page admin section.

If you want to add XML code snippet for the CMS Page, You must have to create a CMS Page layout handle for the page.

If you want to add Custom layout update code for the About Us page, You need to create a unique XML handle for the CMS page. Continue reading “How to add Cms Page Custom Layout Update file in Magento 2.3.4?”

Verify Contact page is enable or not using programmatically Magento 2.

Contact us page is Enable or not, Check using Programmatically way by Magento 2.

By Default from Admin panel, you can verify it by Stores -> Configuration -> Contacts tab. Continue reading “Verify Contact page is enable or not using programmatically Magento 2.”

How to delete CMS Page by Id programmatically in Magento 2?

You can delete CMS Page by Page id in Magento 2 using PageRepositoryInterface interface.

Magento\Cms\Api\PageRepositoryInterface interface is responsible for delete a CMS page from admin panel.

You just need to inject interface in your constructor to delete CMS page. Continue reading “How to delete CMS Page by Id programmatically in Magento 2?”