note section name in block IDs
This commit is contained in:
parent
6ccda9f893
commit
d8ae474efc
@ -157,15 +157,16 @@ EOD;
|
|||||||
|
|
||||||
function block_to_html($block, $hidable=false) {
|
function block_to_html($block, $hidable=false) {
|
||||||
$h = $block->header;
|
$h = $block->header;
|
||||||
|
$s = $block->section;
|
||||||
$b = $block->body;
|
$b = $block->body;
|
||||||
$html = "";
|
$html = "";
|
||||||
if($hidable) {
|
if($hidable) {
|
||||||
$i = str_replace(' ', '_', $h);
|
$i = str_replace(' ', '_', $h.$s);
|
||||||
if(!is_null($h)) $html .= "\n<h3 id='$i-toggle' onclick=\"toggle('$i')\">$h</h3>\n";
|
if(!is_null($h)) $html .= "\n<h3 id='$i-toggle' onclick=\"toggle('$i')\">$h</h3>\n";
|
||||||
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
|
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$i = str_replace(' ', '_', $h);
|
$i = str_replace(' ', '_', $h.$s);
|
||||||
if(!is_null($h)) $html .= "\n<h3>$h</h3>\n";
|
if(!is_null($h)) $html .= "\n<h3>$h</h3>\n";
|
||||||
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
|
if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user