blocks as $block) { switch ($block->section) { case "left": $left_block_html .= $block->get_html(true); break; case "main": $main_block_html .= $block->get_html(false); break; case "subheading": $sub_block_html .= $block->body; break; default: print "

error: {$block->header} using an unknown section ({$block->section})"; break; } } if (empty($this->subheading)) { $subheading = ""; } else { $subheading = "

{$this->subheading}
"; } if ($this->left_enabled) { $left = ""; $withleft = "withleft"; } else { $left = ""; $withleft = ""; } $flash_html = $this->flash_html(); $footer_html = $this->footer_html(); return <<

{$this->heading}

$subheading $sub_block_html $left
$flash_html $main_block_html
EOD; } }