D7 has a new round of THEME_process_HOOK functions that come after the preprocess functions. This allows more control over the rendering of some things.

You could pass an un-rendered array of data to the sub-theme in the preprocess layer. And then wait to render it to HTML until the zen_process_HOOK function.

I'm pretty sure we could add this level of functions to Zen using some HOOK_theme() magic.

Comments

JohnAlbin’s picture

Title: ADD theme_process_HOOK functions to Zen » Add THEME_process_HOOK functions to Zen
Status: Active » Fixed

Fixed.

redraven’s picture

When I recently updated to the most recent 2.x-dev release, the assigning of classes to blocks ceased to function. No classes were assigned.

I use the sub-theme method to create a sub-theme of the zen_ninesixty subtheme.

I tracked the problem back to this commit:

http://drupal.org/cvs?commit=255756

And relates to this issue, so I thought I would alert.

I will investigate further, for the time being I've reverted to an earlier dev release.

Do the changes in this commit require changes to how sub-themes are implemented?

redraven’s picture

I carefully read through the new zen documentation (THANK YOU ALL!) and resolved the issue I was having.

Status: Fixed » Closed (fixed)

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

vietcoop’s picture

Status: Closed (fixed) » Active

This commit break views-HEAD.

It should be:

function zen_process(&$vars, $hook) {
    // ...
    default:
      if (empty($vars['classes'])) {
        $vars['classes'] = '';
      }
      $vars['classes'] .= !empty($vars['classes_array']) ? implode(' ', $vars['classes_array']) : '';
      break;
    // ...

Instead:

function zen_process(&$vars, $hook) {
    // ...

    default:
      $vars['classes'] = !empty($vars['classes_array']) ? implode(' ', $vars['classes_array']) : '';
      break;
    // ...
JohnAlbin’s picture

Status: Active » Closed (fixed)