Set default layout_file depending on the current layout_path

This commit is contained in:
Kijin Sung 2025-09-18 19:39:37 +09:00
parent 61ea93064a
commit dcd84033cf

View file

@ -151,14 +151,21 @@ class HTMLDisplayHandler
Context::loadFile(array($edited_layout_css, 'all', '', 100)); Context::loadFile(array($edited_layout_css, 'all', '', 100));
} }
} }
if(!$layout_path) if (!$layout_path)
{ {
$layout_path = './common/tpl'; $layout_path = './common/tpl';
} }
if(!$layout_file) if (!$layout_file)
{
if ($layout_path === './common/tpl')
{ {
$layout_file = 'default_layout'; $layout_file = 'default_layout';
} }
else
{
$layout_file = 'layout';
}
}
$oTemplate = new Rhymix\Framework\Template; $oTemplate = new Rhymix\Framework\Template;
$output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file); $output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file);