diff --git a/base.php b/base.php index d04a77e..96e074d 100644 --- a/base.php +++ b/base.php @@ -18,11 +18,12 @@ function useServerSideRendering () { function serverSideRender ($data) { // Get the templates - $header = file_get_contents('templates/default/header.html'); - $footer = file_get_contents('templates/default/footer.html'); - $main = file_get_contents('templates/default/main.html'); - $bookdetail = file_get_contents('templates/default/bookdetail.html'); - $page = file_get_contents('templates/default/page.html'); + $theme = getCurrentTemplate (); + $header = file_get_contents('templates/' . $theme . '/header.html'); + $footer = file_get_contents('templates/' . $theme . '/footer.html'); + $main = file_get_contents('templates/' . $theme . '/main.html'); + $bookdetail = file_get_contents('templates/' . $theme . '/bookdetail.html'); + $page = file_get_contents('templates/' . $theme . '/page.html'); // Generate the function for the template $template = new doT (); @@ -76,6 +77,10 @@ function getCurrentCss () { return "styles/style-" . getCurrentOption ("style") . ".css"; } +function getCurrentTemplate () { + return "default"; +} + function getUrlWithVersion ($url) { return $url . "?v=" . VERSION; } diff --git a/index.php b/index.php index e23f2e9..1220c12 100644 --- a/index.php +++ b/index.php @@ -79,7 +79,8 @@