Community Documentation

overridding the the default sidebar layout

Last updated October 18, 2011. Created by dmitrig01 on July 20, 2006.
Edited by MGParisi, ronald_istos, sepeck. Log in to edit this page.

To override the the default sidebar layout, put the following in template.php

<?php
function phptemplate_blocks($region) {
 
$output = '';

  if (
$list = module_invoke('block', 'list', $region)) {
    foreach (
$list as $key => $block) {
     
// $key == <i>module</i>_<i>delta</i>
     
$output .= theme('block', $block);
    }
  }

 
// Add any content assigned to this region through drupal_set_content() calls.
 
$output .= drupal_get_content($region);

  return
$output;
}
?>

About this page

Drupal version
Drupal 4.7.x
Audience
Designers/themers

Archive

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here