heading support brought to stable, for people who want to pull the rss_images extension from unstable svn
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.0@46 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
0d788d9d61
commit
187de18322
@ -39,6 +39,7 @@ class Page {
|
||||
var $heading = "";
|
||||
var $subheading = "";
|
||||
var $quicknav = "";
|
||||
var $headers = array();
|
||||
var $sideblocks = array();
|
||||
var $mainblocks = array();
|
||||
|
||||
@ -54,6 +55,11 @@ class Page {
|
||||
$this->subheading = $subheading;
|
||||
}
|
||||
|
||||
public function add_header($line, $position=50) {
|
||||
while(isset($this->headers[$position])) $position++;
|
||||
$this->headers[$position] = $line;
|
||||
}
|
||||
|
||||
public function add_side_block($block, $position=50) {
|
||||
while(isset($this->sideblocks[$position])) $position++;
|
||||
$this->sideblocks[$position] = $block;
|
||||
|
@ -14,6 +14,11 @@ function block_to_html($block) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
$header_html = "";
|
||||
foreach($this->headers as $line) {
|
||||
$header_html .= "\t\t$line";
|
||||
}
|
||||
|
||||
$sideblock_html = "";
|
||||
foreach($this->sideblocks as $block) {
|
||||
$sideblock_html .= block_to_html($block);
|
||||
@ -73,6 +78,7 @@ print <<<EOD
|
||||
<head>
|
||||
<title>{$this->title}</title>
|
||||
<link rel="stylesheet" href="$data_href/themes/default/style.css" type="text/css">
|
||||
$header_html
|
||||
<script src='$data_href/themes/default/sidebar.js' type='text/javascript'></script>
|
||||
$script_html
|
||||
</head>
|
||||
|
Loading…
x
Reference in New Issue
Block a user