get_string(SetupConfig::THEME, 'default'); $data_href = get_base_href(); $contact_link = contact_link(); $header_html = $page->get_all_html_headers(); $left_block_html = ""; $main_block_html = ""; $sub_block_html = ""; foreach ($page->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; // $this->block_to_html($block, true); break; default: print "

error: {$block->header} using an unknown section ({$block->section})"; break; } } $debug = get_debug_info(); $contact = empty($contact_link) ? "" : "
Contact"; if (empty($page->subheading)) { $subheading = ""; } else { $subheading = "

{$page->subheading}
"; } if ($page->left_enabled) { $left = ""; $withleft = "withleft"; } else { $left = ""; $withleft = ""; } $flash_html = $page->flash ? "".nl2br(html_escape(implode("\n", $flash)))."" : ""; print << {$page->title} $header_html

{$page->heading}

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