give all blocks an ID, not just those which toggle

git-svn-id: file:///home/shish/svn/shimmie2/trunk@284 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-16 06:43:49 +00:00
parent 2e574edef6
commit 68172f94b6

View File

@ -78,15 +78,15 @@ EOD;
$h = $block->header; $h = $block->header;
$b = $block->body; $b = $block->body;
$html = ""; $html = "";
if($hidable) {
$i = str_replace(' ', '_', $h); $i = str_replace(' ', '_', $h);
if(!is_null($h)) $html .= "\n<h3 id='$i-toggle' onclick=\"toggle('$i')\">$h</h3>\n"; if($hidable) {
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n"; $toggle = " onclick=\"toggle('$i')\"";
} }
else { else {
if(!is_null($h)) $html .= "\n<h3>$h</h3>\n"; $toggle = "";
if(!is_null($b)) $html .= "<div>$b</div>\n";
} }
if(!is_null($h)) $html .= "\n<h3 id='$i-toggle'$toggle>$h</h3>\n";
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
return $html; return $html;
} }
} }