mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix default skin handling in page module
This commit is contained in:
parent
7b16ee31c3
commit
ed557883c7
2 changed files with 5 additions and 15 deletions
|
|
@ -24,23 +24,14 @@ class PageMobile extends PageView
|
|||
}
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
||||
if($this->module_info->mskin === '/USE_RESPONSIVE/')
|
||||
$template_path = $this->getTemplatePath();
|
||||
if (preg_match('!/skins/!', $template_path))
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
|
||||
if(!is_dir($template_path)||!$this->module_info->skin)
|
||||
{
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, 'default');
|
||||
}
|
||||
$page_content = $oTemplate->compile($template_path, 'content');
|
||||
$page_content = $oTemplate->compile($this->getTemplatePath(), 'content');
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf("%sm.skins/%s/",$this->module_path, $this->module_info->mskin);
|
||||
if(!is_dir($template_path)||!$this->module_info->mskin)
|
||||
{
|
||||
$template_path = sprintf("%sm.skins/%s/",$this->module_path, 'default');
|
||||
}
|
||||
$page_content = $oTemplate->compile($template_path, 'mobile');
|
||||
$page_content = $oTemplate->compile($this->getTemplatePath(), 'mobile');
|
||||
}
|
||||
|
||||
return $page_content;
|
||||
|
|
|
|||
|
|
@ -154,8 +154,7 @@ class PageView extends Page
|
|||
}
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
||||
$templatePath = sprintf('%sskins/%s', $this->module_path, $this->module_info->skin ?: 'default');
|
||||
$page_content = $oTemplate->compile($templatePath, 'content');
|
||||
$page_content = $oTemplate->compile($this->getTemplatePath(), 'content');
|
||||
|
||||
return $page_content;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue