git.schokokeks.org
Repositories
Help
Report an Issue
webinterface.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
815a905
Branches
Tags
master
ticket
webinterface.git
inc
theme.php
Auch $html_header muss dem Theme zur Verfügung stehen
bernd
commited
815a905
at 2010-09-19 10:05:40
theme.php
Blame
History
Raw
<?php function show_page($path = NULL) { global $go, $title, $headline, $output, $module, $page, $html_header; if ($path) { $module = $path; } $theme = config('theme'); if (! $theme) $theme = 'default'; $theme_path = "themes/$theme/"; $candidates = array(); if ($page) { $candidates[] = "{$theme_path}page-$module-$page.tpl.php"; } $candidates[] = "{$theme_path}page-$module.tpl.php"; $candidates[] = "{$theme_path}page.tpl.php"; if ($page) { $candidates[] = "modules/{$module}/theme/page-$page.tpl.php"; } $candidates[] = "modules/{$module}/theme/page.tpl.php"; if ($page) { $candidates[] = "themes/default/page-$module-$page.tpl.php"; } $candidates[] = "themes/default/page-$module.tpl.php"; $candidates[] = "themes/default/page.tpl.php"; $theme_file = NULL; foreach ($candidates AS $c) { if (file_exists($c)) { $theme_file = $c; break; } } if (! file_exists($theme_file)) die("cannot get any theme file"); include('inc/top.php'); if (!isset($title)) $title = ''; if (!isset($headline)) $headline = $title; $content = $output; include($theme_file); }