block name seeding
git-svn-id: file:///home/shish/svn/shimmie2/trunk@673 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
aa998fcc06
commit
43dc8a6710
@ -19,10 +19,10 @@ class Layout {
|
||||
foreach($page->blocks as $block) {
|
||||
switch($block->section) {
|
||||
case "left":
|
||||
$left_block_html .= $this->block_to_html($block, true);
|
||||
$left_block_html .= $this->block_to_html($block, true, "left");
|
||||
break;
|
||||
case "main":
|
||||
$main_block_html .= $this->block_to_html($block, false);
|
||||
$main_block_html .= $this->block_to_html($block, false, "main");
|
||||
break;
|
||||
default:
|
||||
print "<p>error: {$block->header} using an unknown section ({$block->section})";
|
||||
@ -73,11 +73,11 @@ $header_html
|
||||
EOD;
|
||||
}
|
||||
|
||||
function block_to_html($block, $hidable=false) {
|
||||
function block_to_html($block, $hidable=false, $salt="") {
|
||||
$h = $block->header;
|
||||
$b = $block->body;
|
||||
$html = "";
|
||||
$i = str_replace(' ', '_', $h);
|
||||
$i = str_replace(' ', '_', $h) . $salt;
|
||||
if($hidable) {
|
||||
$toggle = " onclick=\"toggle('$i')\"";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user