| 3 |
// $Id$ |
// $Id$ |
| 4 |
// ------------------------------------------------------------------------------- |
// ------------------------------------------------------------------------------- |
| 5 |
// $Log$ |
// $Log$ |
| 6 |
|
// Revision 1.5 2002/12/23 11:33:58 jonen |
| 7 |
|
// + minor changes |
| 8 |
|
// |
| 9 |
|
// Revision 1.4 2002/12/19 16:25:29 joko |
| 10 |
|
// + function loadCmsPage($template, $data_merge = array()) |
| 11 |
|
// |
| 12 |
// Revision 1.3 2002/12/19 06:17:32 joko |
// Revision 1.3 2002/12/19 06:17:32 joko |
| 13 |
// + database, smarty, and langtext (lt) now gets initialized here (on Site startup) |
// + database, smarty, and langtext (lt) now gets initialized here (on Site startup) |
| 14 |
// |
// |
| 115 |
function &loadHandler($a) { |
function &loadHandler($a) { |
| 116 |
return $this->loader->loadHandler($a); |
return $this->loader->loadHandler($a); |
| 117 |
} |
} |
| 118 |
function &loadPage($a) { |
function &loadPage($a, $b = array()) { |
| 119 |
return $this->loader->loadPage($a); |
return $this->loader->loadPage($a, $b); |
| 120 |
} |
} |
| 121 |
function &loadTemplate($a, $b = array(), $c = "") { |
function &loadTemplate($a, $b = array(), $c = "") { |
| 122 |
return $this->loader->loadTemplate($a, $b, $c); |
return $this->loader->loadTemplate($a, $b, $c); |
| 159 |
} |
} |
| 160 |
} |
} |
| 161 |
|
|
| 162 |
|
function loadCmsPage($template, $data_merge = array()) { |
| 163 |
|
|
| 164 |
|
//print Dumper($this->getRequest()); |
| 165 |
|
|
| 166 |
|
// default data to provide to scope of cms |
| 167 |
|
// TODO/REVIEW: should we be more strict here? |
| 168 |
|
// e.g. just pass in '$site->config->url' or s.th.l.th. |
| 169 |
|
$data = array( |
| 170 |
|
'config' => $this->config, |
| 171 |
|
'request' => $this->getRequest(), |
| 172 |
|
); |
| 173 |
|
|
| 174 |
|
// merge in additional data |
| 175 |
|
foreach ($data_merge as $key => $val) { |
| 176 |
|
$data[$key] = $val; |
| 177 |
|
} |
| 178 |
|
|
| 179 |
|
// load template |
| 180 |
|
$this->loadTemplate($template, $data); |
| 181 |
|
|
| 182 |
|
} |
| 183 |
|
|
| 184 |
} |
} |
| 185 |
|
|
| 186 |
?> |
?> |