diff --git a/application/core/CMS_Controller.php b/application/core/CMS_Controller.php index d4511c48..4bcea553 100755 --- a/application/core/CMS_Controller.php +++ b/application/core/CMS_Controller.php @@ -125,12 +125,6 @@ public function __construct() } } - - if(!$this->input->is_ajax_request() && strtoupper(trim($this->cms_get_config('site_show_benchmark'))) == 'TRUE'){ - $this->output->enable_profiler(TRUE); - }else{ - $this->output->enable_profiler(FALSE); - } } public function __call($method, $args){ @@ -589,13 +583,6 @@ protected function view($view_url, $data = null, $navigation_name = null, $confi $result = null; $view_url = $this->cms_parse_keyword($view_url); - // Profiler - if(!$this->input->is_ajax_request() && strtoupper(trim($this->cms_get_config('site_show_benchmark'))) == 'TRUE'){ - $this->output->enable_profiler(TRUE); - }else{ - $this->output->enable_profiler(FALSE); - } - /* * PREPARE PARAMETERS ********************************************************************************************* */ @@ -965,7 +952,17 @@ protected function view($view_url, $data = null, $navigation_name = null, $confi if ($return_as_string) { return $result; } else { - $this->cms_show_html($result); + + // Profiler + if(!$this->input->is_ajax_request() && strtoupper(trim($this->cms_get_config('site_show_benchmark'))) == 'TRUE'){ + $this->output->enable_profiler(TRUE); + }else{ + $this->output->enable_profiler(FALSE); + } + + echo $result; + // load view introduce rendering problem if profiler activated, thus I use echo for now + //$this->cms_show_html($result); } } @@ -1006,6 +1003,8 @@ private function __cms_parse_widget_theme_path($html, $theme, $layout, $navigati if (strpos($html, '{{ ') !== false && $recursive_level > 0) { $html = $this->__cms_parse_widget_theme_path($html, $theme, $layout, $navigation_name, $recursive_level); } + + $html = $this->{$this->__cms_base_model_name}->cms_unescape_template($html); } return $html; diff --git a/application/core/CMS_Model.php b/application/core/CMS_Model.php index 514ad96c..54cb2fcc 100755 --- a/application/core/CMS_Model.php +++ b/application/core/CMS_Model.php @@ -3520,6 +3520,8 @@ public function cms_parse_keyword($value) ), $value); } + $value = $this->cms_unescape_template($value); + return $value; } diff --git a/assets/nocms/images/custom_background/firewatch_150305_04.png b/assets/nocms/images/custom_background/firewatch_150305_04.png new file mode 100755 index 00000000..a92de868 Binary files /dev/null and b/assets/nocms/images/custom_background/firewatch_150305_04.png differ diff --git a/doc/tutorial.md b/doc/tutorial.md index 786de65e..e07d037d 100755 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -18,6 +18,7 @@ For mere users and everyone * [Installation](tutorial/user_installation.md) * [Update & Migration](tutorial/user_update_and_migration.md) * [Themes](tutorial/user_themes.md) +* [Layouts](tutorial/user_layout.md) * [Setting](tutorial/user_setting.md) * [User & Groups](tutorial/user_user_and_group.md) * [Navigation & Pages](tutorial/user_navigation.md) diff --git a/doc/tutorial/designer_themes.md b/doc/tutorial/designer_themes.md index 0cab5d67..7fd51997 100755 --- a/doc/tutorial/designer_themes.md +++ b/doc/tutorial/designer_themes.md @@ -4,93 +4,43 @@ Themes ====== You can change No-CMS theme by accessing `Complete Menu | CMS Management | Change Theme` or `CMS Management | Change Theme`. -To set per-page theme, you can access `Complete Menu | Page Management` and set `Default Theme` +To set per-page theme, you can access `Complete Menu | Navigation Management` and set `Default Theme` -Themes are located at `/themes/` folder. With such a structure: +Themes are located at `/themes/` folder. With this structure: ``` /themes |--- [your_theme] - |--- /assets - | |--- /default (consists of js, css, images etc) - | |--- /[other_layout] (optional) + |--- /assets (Contains your css, js, fonts, and other static files) | |--- /views - |--- /layouts - | |--- default.php (here is the main UI script) - | |--- [other_layout].php (optional) - | - |--- /partials - |--- /default - |--- /other_layout -``` -In your `default.php`, you can several variables: - -* `$template['body']` : This variable contains your page content. -* `$template['title']` : This variable contains your page title -* `$template['metadata']` : This variable contains everything including JQuery, meta keyword, and language information -* `$template['partials']['header']` : Including `/views/partials/default/header.php`. + | |--- css.php (how the css used in your theme) + | | + | |--- js.php (how the js used in your theme) + | + |--- description.txt (theme's description) + | + |--- preview.png -You can also use several tags such as: -* `{{ site_logo }}` : Your logo path -* `{{ site_slogan }}` : Slogan -* `{{ site_footer }}` : Your footer -* `{{ widget_name:top_navigation }}` : A widget contains bootstrap styled top navigation -* `{{ widget_name:left_navigation }}` : A widget contains bootstrap styled top navigation -* And many others, see [designer tag's guide](designer_tags.md) for more information +css.php +======= +Example of css.php: -Here is a very simple example of `default.php`: ```php - - -
-