I just removed the logic from the template, moving it to the preprocess function.

This...

<body class="<?php echo $body_classes; ?><?php if (!empty($primary_links)): ?> withprimary <?php else: ?> noprimary <?php endif; ?>">

became:

<body class="<?php echo $body_classes; ?>">

And this goes to painted_preprocess_page on template.php:

<?php  
if (!empty($vars['primary_links'])){
    $body_classes[] = 'withprimary';
  } else{
    $body_classes[] = 'noprimary';
  }
?>

PS: This theme is perfect and this new version is even better. Tks from Brazil.
PS: I hope that my first patch works.

Sorry for my poor English.

CommentFileSizeAuthor
painted-6.x-2.patch1.88 KBaalemmar

Comments

Anonymous’s picture

Version: 6.x-2.x-dev » 6.x-2.0-beta1
Status: Needs review » Fixed

Commited to 6 BETA 1
Thanks :)

Status: Fixed » Closed (fixed)

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