add subheading support to all themes

This commit is contained in:
Shish
2010-01-03 09:56:07 +00:00
parent 15f78d9883
commit 2a924a1840
4 changed files with 21 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class Layout {
$left_block_html = "";
$main_block_html = "";
$sub_block_html = "";
foreach($page->blocks as $block) {
switch($block->section) {
@ -24,6 +25,9 @@ class Layout {
case "main":
$main_block_html .= $this->block_to_html($block, false, "main");
break;
case "subheading":
$sub_block_html .= $block->body; // $this->block_to_html($block, true);
break;
default:
print "<p>error: {$block->header} using an unknown section ({$block->section})";
break;
@ -55,6 +59,7 @@ $header_html
<body>
<h1$wrapper>{$page->heading}</h1>
$subheading
$sub_block_html
<div id="nav">$left_block_html</div>
<div id="body">$main_block_html</div>