Sort of related to http://drupal.org/node/520752 but sort of not:

When multiple contexts are active and more than one of the contexts has a body class set, it is *highly* useful for all those body classes to be applied. This was the behavior under 1.x. I'm discovering this now because we relied on this behavior previously and now our theming is breaking since we updated to 2.x. Under 2.x, the last context to be evaluated with 'theme_section' set has its values applied; this can, in theory, mean that no body class is applied at all (if the last context has a title set but no body class, for example).

Would it be possible to either handle body class as a special case, or else move it out of the 'theme_section' array and have it be a numeric array? Either way would solve the problem.

I'm happy to write the patch if it's decided this is a good idea. In the absence of context weighting (see http://drupal.org/node/520752) it seems like this would address some of the current limitations.

CommentFileSizeAuthor
#1 context.patch2.18 KBtimcosgrove

Comments

timcosgrove’s picture

Status: Active » Needs review
StatusFileSize
new2.18 KB

For example, attached is a patch that does what I'm talking about. It's not necessarily the most elegant way of doing it, but it does accomplish multiple body classes without forcing an API change.

yhahn’s picture

Assigned: Unassigned » yhahn
Status: Needs review » Fixed

Great -- I've committed a slightly different implementation with the same effect: http://drupal.org/cvs?commit=242088. I also updated the helptext on the body class form element.

Status: Fixed » Closed (fixed)

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