| @@ 144-152 (lines=9) @@ | ||
| 141 | * @author Kaero |
|
| 142 | * @copyright ImageCMS (c) 2013, Kaero <[email protected]> |
|
| 143 | */ |
|
| 144 | public function fetchTemplate($tpl, $moduleName = null) { |
|
| 145 | try { |
|
| 146 | /** Start. Return template file */ |
|
| 147 | return CI_Controller::get_instance()->template->fetch('file:' . $this->_buildTemplatePath($tpl, $moduleName)); |
|
| 148 | } catch (Exception $exc) { |
|
| 149 | log_message('error', $exc->getMessage()); |
|
| 150 | show_error($exc->getMessage(), 500, 'An Template Error Was Encountered'); |
|
| 151 | } |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * @param string $item |
|
| @@ 590-598 (lines=9) @@ | ||
| 587 | * @param string $mainLayout |
|
| 588 | * @return assetManager |
|
| 589 | */ |
|
| 590 | public function setMainLayout($mainLayout) { |
|
| 591 | try { |
|
| 592 | CI_Controller::get_instance()->template->set_main_layout($mainLayout); |
|
| 593 | } catch (Exception $exc) { |
|
| 594 | log_message('error', $exc->getMessage()); |
|
| 595 | show_error($exc->getMessage(), 500, 'An Template Error Was Encountered'); |
|
| 596 | } |
|
| 597 | return $this; |
|
| 598 | } |
|
| 599 | ||
| 600 | /** |
|
| 601 | * Changing main layout file by full path |
|
| @@ 605-613 (lines=9) @@ | ||
| 602 | * @param string $mainLayout |
|
| 603 | * @return assetManager |
|
| 604 | */ |
|
| 605 | public function setMainLayoutByFullPath($mainLayout) { |
|
| 606 | try { |
|
| 607 | CI_Controller::get_instance()->template->set_main_layout_by_full_path($mainLayout); |
|
| 608 | } catch (Exception $exc) { |
|
| 609 | log_message('error', $exc->getMessage()); |
|
| 610 | show_error($exc->getMessage(), 500, 'An Template Error Was Encountered'); |
|
| 611 | } |
|
| 612 | return $this; |
|
| 613 | } |
|
| 614 | ||
| 615 | } |
|