Body classes are not showing up for me. Only if I hardcode them into the theme.

Anyone else having this issue?

Comments

amcc’s picture

me too, i'm getting no body classes if logged out.

I'm using Acquia Drupal 6 install, I have zen and zen_ninesixty installed as recommended

s.daniel’s picture

Seems to be an incompatibility with zen 6.x-2.x

body classes work fine with zen 6.x-1.1 + Zen nineSixty 6.x-4.3

However since 6.x-2.0 is the recommended version of zen please add a compatibility note to the zen ninesixty modules page.

thijsvdanker’s picture

Changing l:117 in template.php
$classes = split(' ', $vars['body_classes']);
to:
$classes = $vars['classes_array'];
Makes the body classes work again with Zen nineSixty 6.x-4.3 + zen 6.x-2.x
This is the quickest but probably/possibly not the right way to fix it!

notluap’s picture

I have tried downgrading zen, as well as changing the template.php as in post #3 but neither work for me. No body classes when not logged in.

notluap’s picture

Follow up, post #3 did work for me after flushing my cache registry.

Thank you.

christopherareed’s picture

@ #4 Not sure if this helps, but from #3's directions - it was line 111 for me, not 117 and it worked.

Dublin Drupaller’s picture

#3 worked for me for version 6.x-4.3. thanks thijsvdanker.
dub

BrianLewisDesign’s picture

Title: Body classes not showing up » D6 $body_classes in core.

In D6, the $body_classes is defined in core. All you need is to echo:
<body class="<?php print $body_classes; ?>">

And for more classes use themer, and:
http://drupal.org/project/themer
<body class="<?php print themer_body_class(); ?> <?php print $body_classes; ?>">