Changing a page's body class
Tutorial valid only for Legacy CMS Stores.
The templates used by store layouts, by default, don't carry any class in their <body>
element.
See, for example, the Department template code.

It has an id
, but not a class
.
However, when loading a layout that uses this template, we note that the departmento
class has been added to the body of the page.

That is, the system inserts this class automatically.
You can set the value of this class in the CMS. To do this, follow the steps below:
-
In the VTEX Admin, access Storefront > Layout > CMS.
-
Click Sites and Channels folder and enter the layout whose class you want to change.
-
Change the value of the Body Class field.
-
Click the Save Layout button.