From 551879cb7e1e7dc08646e0bb1c01233a7546c7c4 Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 6 Nov 2012 19:25:57 +0200 Subject: [PATCH] Site: template() method improvments. added ability to get template from specific theme --- monstra/engine/site.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/monstra/engine/site.php b/monstra/engine/site.php index 55079f6..9cdb7b8 100644 --- a/monstra/engine/site.php +++ b/monstra/engine/site.php @@ -164,12 +164,13 @@ * echo Site::template(); * * + * @param string $theme Theme name * @return mixed */ - public static function template() { + public static function template($theme = null) { - // Get current theme - $current_theme = Option::get('theme_site_name'); + // Get specific theme or current theme + $current_theme = ($theme == null) ? Option::get('theme_site_name') : $theme ; // Get template $template = call_user_func(ucfirst(Uri::command()).'::template');