diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-05-15 18:09:19 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-05-15 18:09:19 +0000 |
commit | d90c5a3a4200d1531bb3b9a238e92acd0d29c042 (patch) | |
tree | 210fdfcd24401f5e770ab37a5fef0521840edb6d /themes | |
parent | 1c84b56e8ea928ef673b7a1f79ad79e16904e586 (diff) | |
download | brdo-d90c5a3a4200d1531bb3b9a238e92acd0d29c042.tar.gz brdo-d90c5a3a4200d1531bb3b9a238e92acd0d29c042.tar.bz2 |
Patch by Ax:
- Show sidebar only if there is at least one block.
- Remove xml prolog; fixes http://lists.drupal.org/pipermail/drupal-devel/2003-May/024484.html.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/xtemplate/xtemplate.theme | 7 | ||||
-rw-r--r-- | themes/xtemplate/xtemplate.xtmpl | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/themes/xtemplate/xtemplate.theme b/themes/xtemplate/xtemplate.theme index 7bbabf995..d0bf0c053 100644 --- a/themes/xtemplate/xtemplate.theme +++ b/themes/xtemplate/xtemplate.theme @@ -126,12 +126,15 @@ class Theme_xtemplate extends BaseTheme { // so we need some output buffering ob_start(); theme_blocks("all"); + if ($blocks = ob_get_contents()) { + $this->template->assign("blocks", $blocks); + $this->template->parse("footer.blocks"); + } + ob_end_clean(); $this->template->assign( array( - "blocks" => ob_get_contents(), "footer_message" => variable_get("site_footer", ""), "footer" => theme_footer() )); - ob_end_clean(); $this->template->parse("footer"); print $this->template->text("footer"); diff --git a/themes/xtemplate/xtemplate.xtmpl b/themes/xtemplate/xtemplate.xtmpl index f6dfbfcd6..287739d42 100644 --- a/themes/xtemplate/xtemplate.xtmpl +++ b/themes/xtemplate/xtemplate.xtmpl @@ -1,5 +1,4 @@ <!-- BEGIN: header --> -<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> @@ -86,9 +85,11 @@ <!-- BEGIN: footer --> </div><!-- main --> </td> + <!-- BEGIN: blocks --> <td valign="top" id="sidebar"> {blocks} </td> + <!-- END: blocks --> </tr> </table> |