To add a class via layout XML:
<reference name="root">
<action method="addBodyClass"><classname>whatever</classname></action>
</reference>
Or to add via code, from a controller or block
if ($root = $this->getLayout()->getBlock('root')) {
$root->addBodyClass('whatever');
}
Posted by Mike Whitby to Magento (2012-07-13 09:52)