| 3 |
// $Id$ |
// $Id$ |
| 4 |
// ------------------------------------------------------------------------------- |
// ------------------------------------------------------------------------------- |
| 5 |
// $Log$ |
// $Log$ |
| 6 |
|
// Revision 1.4 2002/12/19 16:25:29 joko |
| 7 |
|
// + function loadCmsPage($template, $data_merge = array()) |
| 8 |
|
// |
| 9 |
// Revision 1.3 2002/12/19 06:17:32 joko |
// Revision 1.3 2002/12/19 06:17:32 joko |
| 10 |
// + database, smarty, and langtext (lt) now gets initialized here (on Site startup) |
// + database, smarty, and langtext (lt) now gets initialized here (on Site startup) |
| 11 |
// |
// |
| 156 |
} |
} |
| 157 |
} |
} |
| 158 |
|
|
| 159 |
|
function loadCmsPage($template, $data_merge = array()) { |
| 160 |
|
|
| 161 |
|
//print Dumper($this->getRequest()); |
| 162 |
|
|
| 163 |
|
// default data to provide to scope of cms |
| 164 |
|
// TODO/REVIEW: should we be more strict here? |
| 165 |
|
// e.g. just pass in '$site->config->url' or s.th.l.th. |
| 166 |
|
$data = array( |
| 167 |
|
'config' => $this->config, |
| 168 |
|
'request' => $this->getRequest(), |
| 169 |
|
); |
| 170 |
|
|
| 171 |
|
// merge in additional data |
| 172 |
|
foreach ($data_merge as $key => $val) { |
| 173 |
|
$data[$key] = $val; |
| 174 |
|
} |
| 175 |
|
|
| 176 |
|
// load template |
| 177 |
|
$this->loadTemplate($template, $data); |
| 178 |
|
|
| 179 |
|
} |
| 180 |
|
|
| 181 |
} |
} |
| 182 |
|
|
| 183 |
?> |
?> |