mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-05 12:48:00 +02:00
Site: template() method improvments. added ability to get template from specific theme
This commit is contained in:
@@ -164,12 +164,13 @@
|
|||||||
* echo Site::template();
|
* echo Site::template();
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
|
* @param string $theme Theme name
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public static function template() {
|
public static function template($theme = null) {
|
||||||
|
|
||||||
// Get current theme
|
// Get specific theme or current theme
|
||||||
$current_theme = Option::get('theme_site_name');
|
$current_theme = ($theme == null) ? Option::get('theme_site_name') : $theme ;
|
||||||
|
|
||||||
// Get template
|
// Get template
|
||||||
$template = call_user_func(ucfirst(Uri::command()).'::template');
|
$template = call_user_func(ucfirst(Uri::command()).'::template');
|
||||||
|
Reference in New Issue
Block a user