add subheading support to all themes
This commit is contained in:
parent
15f78d9883
commit
2a924a1840
@ -60,6 +60,7 @@ class Layout {
|
|||||||
$left_block_html = "";
|
$left_block_html = "";
|
||||||
$user_block_html = "";
|
$user_block_html = "";
|
||||||
$main_block_html = "";
|
$main_block_html = "";
|
||||||
|
$sub_block_html = "";
|
||||||
|
|
||||||
foreach($page->blocks as $block) {
|
foreach($page->blocks as $block) {
|
||||||
switch($block->section) {
|
switch($block->section) {
|
||||||
@ -69,6 +70,9 @@ class Layout {
|
|||||||
case "user":
|
case "user":
|
||||||
$user_block_html .= $block->body; // $this->block_to_html($block, true);
|
$user_block_html .= $block->body; // $this->block_to_html($block, true);
|
||||||
break;
|
break;
|
||||||
|
case "subheading":
|
||||||
|
$sub_block_html .= $block->body; // $this->block_to_html($block, true);
|
||||||
|
break;
|
||||||
case "main":
|
case "main":
|
||||||
if($block->header == "Images") {
|
if($block->header == "Images") {
|
||||||
$block->header = " ";
|
$block->header = " ";
|
||||||
@ -195,6 +199,7 @@ $header_html
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
$subheading
|
$subheading
|
||||||
|
$sub_block_html
|
||||||
|
|
||||||
$left
|
$left
|
||||||
<div id="body" class="$withleft">$main_block_html</div>
|
<div id="body" class="$withleft">$main_block_html</div>
|
||||||
|
@ -15,6 +15,7 @@ class Layout {
|
|||||||
|
|
||||||
$left_block_html = "";
|
$left_block_html = "";
|
||||||
$main_block_html = "";
|
$main_block_html = "";
|
||||||
|
$sub_block_html = "";
|
||||||
|
|
||||||
foreach($page->blocks as $block) {
|
foreach($page->blocks as $block) {
|
||||||
switch($block->section) {
|
switch($block->section) {
|
||||||
@ -24,6 +25,9 @@ class Layout {
|
|||||||
case "main":
|
case "main":
|
||||||
$main_block_html .= $this->block_to_html($block, false, "main");
|
$main_block_html .= $this->block_to_html($block, false, "main");
|
||||||
break;
|
break;
|
||||||
|
case "subheading":
|
||||||
|
$sub_block_html .= $block->body; // $this->block_to_html($block, true);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
||||||
break;
|
break;
|
||||||
@ -65,6 +69,7 @@ $header_html
|
|||||||
<body>
|
<body>
|
||||||
<h1>{$page->heading}</h1>
|
<h1>{$page->heading}</h1>
|
||||||
$subheading
|
$subheading
|
||||||
|
$sub_block_html
|
||||||
|
|
||||||
$left
|
$left
|
||||||
<div id="body" class="$withleft">$main_block_html</div>
|
<div id="body" class="$withleft">$main_block_html</div>
|
||||||
|
@ -15,6 +15,7 @@ class Layout {
|
|||||||
|
|
||||||
$left_block_html = "";
|
$left_block_html = "";
|
||||||
$main_block_html = "";
|
$main_block_html = "";
|
||||||
|
$sub_block_html = "";
|
||||||
|
|
||||||
foreach($page->blocks as $block) {
|
foreach($page->blocks as $block) {
|
||||||
switch($block->section) {
|
switch($block->section) {
|
||||||
@ -24,6 +25,9 @@ class Layout {
|
|||||||
case "main":
|
case "main":
|
||||||
$main_block_html .= $this->block_to_html($block, false, "main");
|
$main_block_html .= $this->block_to_html($block, false, "main");
|
||||||
break;
|
break;
|
||||||
|
case "subheading":
|
||||||
|
$sub_block_html .= $block->body; // $this->block_to_html($block, true);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
||||||
break;
|
break;
|
||||||
@ -55,6 +59,7 @@ $header_html
|
|||||||
<body>
|
<body>
|
||||||
<h1$wrapper>{$page->heading}</h1>
|
<h1$wrapper>{$page->heading}</h1>
|
||||||
$subheading
|
$subheading
|
||||||
|
$sub_block_html
|
||||||
|
|
||||||
<div id="nav">$left_block_html</div>
|
<div id="nav">$left_block_html</div>
|
||||||
<div id="body">$main_block_html</div>
|
<div id="body">$main_block_html</div>
|
||||||
|
@ -21,6 +21,7 @@ class Layout {
|
|||||||
$left_block_html = "";
|
$left_block_html = "";
|
||||||
$main_block_html = "";
|
$main_block_html = "";
|
||||||
$head_block_html = "";
|
$head_block_html = "";
|
||||||
|
$sub_block_html = "";
|
||||||
|
|
||||||
foreach($page->blocks as $block) {
|
foreach($page->blocks as $block) {
|
||||||
switch($block->section) {
|
switch($block->section) {
|
||||||
@ -33,6 +34,9 @@ class Layout {
|
|||||||
case "main":
|
case "main":
|
||||||
$main_block_html .= $this->block_to_html($block, false, "main");
|
$main_block_html .= $this->block_to_html($block, false, "main");
|
||||||
break;
|
break;
|
||||||
|
case "subheading":
|
||||||
|
$sub_block_html .= $block->body; // $this->block_to_html($block, true);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
||||||
break;
|
break;
|
||||||
@ -70,6 +74,8 @@ $header_html
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
$sub_block_html
|
||||||
|
|
||||||
|
|
||||||
<div id="nav">$left_block_html</div>
|
<div id="nav">$left_block_html</div>
|
||||||
<div id="body">$main_block_html</div>
|
<div id="body">$main_block_html</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user