I have a custom category attribute that i want to add to the body class. As far as I could find out what people do is
- Override the CategoryController and add something like - $root->addBodyClass($category->getMyAttribute());But I don't want to override core classes...
- In the admin panel they add something like - <reference name=”root”><action method=”addBodyClass”><className>caravan-motorhome-lighting</className></action></reference>to each and every category not using the attribute itself but adding the class directly. As I already have an attribute, I surely don't want do clone it and add the class this way.
So what my favourite solution would be is some layout update I can add to the local.xml that says
<reference name=”root”>
    <action method=”addBodyClass”>
        <className>
            get value of my custom attribute here dynamically
        </className>
    </action>
</reference>
Does anyone have an idea how this could work or another idea that I didn't even think of?
 
    
 
    