It seems that adding CSS classes is available in "legacy mode" but not in panelizer's default mode. It would be nice to be able to add body classes with panelizer the say way that you can with panel pages although I'm unsure why this feature was removed so mainly I'm starting this issue as a discussion point. Patch to follow.

Comments

elliotttf’s picture

Status: Active » Needs review
StatusFileSize
new1.69 KB
merlinofchaos’s picture

The text needs to specify that the css class will be added to the body; this can be really important if you're panelizing a view mode such as a teaser, where you really have no business adding body classes.

elliotttf’s picture

Re-rolled the patch based on review feedback.

caschbre’s picture

How does this relate to #1379538: Allow custom body classes? Looks like this was accomplished for panels, but wasn't generic enough for panelizer.

merlinofchaos’s picture

Status: Needs review » Fixed

Cleaned up a bit. This only applies to the page_manager view mode, but other view modes probably have no right to mess with the body class.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

frikovc’s picture

I'm using latest 7.x-3.x-dev and when I add body class on panalized content type per node the body class is added to the HTML markup. When I add body class to default panelizer at content type level (for all nodes) body class is not added (with caches cleared).

Any suggestions what to do?

damienmckenna’s picture

@frikovc: Please open a new bug report for that. Thanks.