The body HTML element class is added without checking of other classes are present, if this is the case, last class get appended with dsv_banner ones.

Comments

pglatz’s picture

Do you mean where I'm adding the classes in dev_banner_preprocess_page() ?
$vars['body_classes'] .= 'dev-banner dev-banner-' . variable_get('dev_banner_position', 'nw');

Turns out this isn't really needed, but if it were, would the proper method be to split body_classes into an array, add the new class, and reassemble it? i.e.
$body_classes = array($vars['body_classes']);
$body_classes[] = 'dev-banner dev-banner-' . variable_get('dev_banner_position', 'nw');
$vars['body_classes'] = implode(' ', $body_classes);

I'm porting the module to D7 now, and have found some other areas of code that could be done better, like using behaviors to bind javascript events.

I appreciate you reporting this so my code would adhere better to d.o standards.

thanks, Phil

pglatz’s picture

Status: Active » Closed (fixed)

Code has been updated, the line in comment #1 has been removed, and jquery now uses behaviors.

Please try latest versions (6.x-1.10, 7.x-1.1).