How to add a body class for a page using Magento 2 admin panel


If you need to add a body class for a page , please use below steps.

> Login to M2 Admin > Go to the content -> pages & select the page you want to add a body class > Select Design tab and add in what you want to add a class from Layout Update XML

Ex:
<body>
<attribute name=”class” value=”service-unavailable”/>
</body>

 

add-body-class-name-admin_cms_page-1024x509

S.S.Niranga

Senior Tech Lead at Netstarter PTY ltd. Magento Certified Front End Developer, Certified ScrumMaster, Microsoft Certified Professional, Member of British Computer Society

Leave a Reply

  • (will not be published)