Find current theme regions in drupal

17 06 2009

I am working on a accordion_blocks module. For this module I wanted to enable the accordion effect for the blocks appearing in left and right regions. To do that I need to find our the regions of the theme. To find out the regions I used bellow code in the hook_theme_registry_alter function.

global $theme;
// Populate all block regions.
$regions = system_region_list($theme);

In the template_preprocess_page hook, I directly used $variables[‘left’], $variables[‘right’]

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: