Great theme...I normally write my own from scratch but this one really saved me time on a project that needed quick turnaround.

The only problem is, it doesn't seem to work with context.module (http://drupal.org/project/context) I use this module all the time in my custom themes without issue...but I cant seem to get it to work with this theme. Basically, i setup a context, assign a block to a region and....well...nothing. The block never appears. If I got into the blocks menu and set the positioning there, it works fine.

I'm thinking there's some incompatibility somehow with the way you're doing regions and what context.module does to place blocks.

Ring any bells?

Comments

ktleow’s picture

Hi thank you for using my theme :)

I've dug through context's code and found out the following from context.core.inc

/**
 * Implementation of hook_theme_registry_alter().
 */
function context_theme_registry_alter(&$theme_registry) {
  ...
  // Reroute theme_blocks() through context_blocks to determine block
  // visibility by context. Only override theme_blocks() if a theme
  // has not overridden it. It is the responsibility of any themes
  // implementing theme_blocks() to take advantage of context block
  // visibility on their own.
  if (!isset($theme_registry['blocks']['type']) || !in_array($theme_registry['blocks']['type'], array('base_theme_engine', 'theme_engine')) && !isset($theme_registry['blocks']['file'])) {
    unset($theme_registry['blocks']['preprocess functions']);
    $theme_registry['blocks']['function'] = 'context_blocks';
  }
}

The problem is that both Context module and Fervens override theme_blocks() function.

Let me look into this in detailed when i'm free and see if there's an alternative way.

ktleow’s picture

mikebell_’s picture

Subscribe

ktleow’s picture

Status: Active » Fixed

The theme should work with Context module now (version 2.5 above).

Replaced theme_blocks() function with template_preprocess_block().

Status: Fixed » Closed (fixed)
Issue tags: -blocks, -Context, -fervens

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