header = $header; $this->body = $body; $this->section = $section; $this->position = $position; $this->id = str_replace(' ', '_', is_null($id) ? (is_null($header) ? md5($body) : $header) . $section : $id); } public function get_html($hidable=false) { $h = $this->header; $b = $this->body; $i = $this->id; $html = "
"; $h_toggler = $hidable ? " shm-toggler" : ""; if(!empty($h)) $html .= "

$h

"; if(!empty($b)) $html .= "
$b
"; $html .= "
\n"; return $html; } } /** * A generic navigation block with a link to the main page. * * Used because "new NavBlock()" is easier than "new Block('Navigation', ..." */ class NavBlock extends Block { public function __construct() { parent::__construct("Navigation", "Index", "left", 0); } } ?>