diff --git a/themes/default/default.php b/themes/default/default.php index bfe62f35..63fa65e1 100644 --- a/themes/default/default.php +++ b/themes/default/default.php @@ -4,24 +4,30 @@ $base_href = $config->get_string('base_href'); $data_href = $config->get_string('data_href'); $contact_link = $config->get_string('contact_link'); -function block_to_html($block) { +function block_to_html($block, $hidable=false) { $h = $block->header; $b = $block->body; - $i = str_replace(' ', '_', $h); $html = ""; - if(!is_null($h)) $html .= "\n

$h

\n"; - if(!is_null($b)) $html .= "
$b
\n"; + if($hidable) { + $i = str_replace(' ', '_', $h); + if(!is_null($h)) $html .= "\n

$h

\n"; + if(!is_null($b)) $html .= "
$b
\n"; + } + else { + if(!is_null($h)) $html .= "\n

$h

\n"; + if(!is_null($b)) $html .= "
$b
\n"; + } return $html; } $sideblock_html = ""; foreach($this->sideblocks as $block) { - $sideblock_html .= block_to_html($block); + $sideblock_html .= block_to_html($block, true); } $mainblock_html = ""; foreach($this->mainblocks as $block) { - $mainblock_html .= block_to_html($block); + $mainblock_html .= block_to_html($block, false); } $scripts = glob("scripts/*.js");