diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-11-29 06:36:12 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-11-29 06:36:12 +0000 |
commit | 36430b4c6411ced6cae2e954ea86dca7ff2906d4 (patch) | |
tree | 460919f11a13064037d9b2f46a0e86254722bcc3 /themes | |
parent | 94fbfe8b3c1830872e2a02cbd5b3bb015b2c9c0d (diff) | |
download | brdo-36430b4c6411ced6cae2e954ea86dca7ff2906d4.tar.gz brdo-36430b4c6411ced6cae2e954ea86dca7ff2906d4.tar.bz2 |
#87090 by kkaefer. Render blocks before page content so they may insert headers.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/chameleon/chameleon.theme | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme index 65e159ac8..f4b5b702f 100644 --- a/themes/chameleon/chameleon.theme +++ b/themes/chameleon/chameleon.theme @@ -32,6 +32,10 @@ function chameleon_page($content, $show_blocks = TRUE) { $title = drupal_get_title(); + // Get blocks before so that they can alter the header (JavaScript, Stylesheets etc.) + $blocks_left = theme_blocks('left'); + $blocks_right = theme_blocks('right'); + $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"; $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\">\n"; $output .= "<head>\n"; @@ -71,10 +75,8 @@ function chameleon_page($content, $show_blocks = TRUE) { $output .= " <table id=\"content\">\n"; $output .= " <tr>\n"; - if ($show_blocks) { - if ($blocks = theme_blocks("left")) { - $output .= " <td id=\"sidebar-left\">$blocks</td>\n"; - } + if ($show_blocks && !empty($blocks_left)) { + $output .= " <td id=\"sidebar-left\">$blocks_left</td>\n"; } $output .= " <td id=\"main\">\n"; @@ -103,10 +105,8 @@ function chameleon_page($content, $show_blocks = TRUE) { $output .= " </td>\n"; - if ($show_blocks) { - if ($blocks = theme_blocks("right")) { - $output .= " <td id=\"sidebar-right\">$blocks</td>\n"; - } + if ($show_blocks && !empty($blocks_right)) { + $output .= " <td id=\"sidebar-right\">$blocks_right</td>\n"; } $output .= " </tr>\n"; |