diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 7eda1476b..c22c81b2d 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -178,13 +178,14 @@ // 레이아웃 정보중 menu를 Context::set if($layout_info->menu_count) { - foreach($layout_info->menu as $menu_id => $menu) Context::set($menu_id, $menu); - unset($layout_info->menu); + foreach($layout_info->menu as $menu_id => $menu) { + if(file_exists($menu->php_file)) include($menu->php_file); + Context::set($menu_id, $menu); + } } // 레이아웃 정보를 Context::set Context::set('layout_info', $layout_info); - debugPrint($layout_info); $oModule->setLayoutPath($layout_info->path); $oModule->setLayoutFile('layout'); diff --git a/config/config.inc.php b/config/config.inc.php index b245bef4b..b3e18ff9e 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -18,7 +18,7 @@ /** * @brief debug mode = true 일때 files/_debug_message.php 에 디버그 내용이 쌓임 **/ - define('__DEBUG__', false); + define('__DEBUG__', true); if(__DEBUG__) { // php5이상이면 error handling을 handleError() 로 set diff --git a/layouts/sample_layout/layout.html b/layouts/sample_layout/layout.html index 6faec191d..4814d563f 100644 --- a/layouts/sample_layout/layout.html +++ b/layouts/sample_layout/layout.html @@ -7,7 +7,15 @@
-
{$content}
+
+ {$content} +
+ + {$val['text']} + +
+
+ diff --git a/modules/layout/layout.controller.php b/modules/layout/layout.controller.php index ffa126dd8..71b21828e 100644 --- a/modules/layout/layout.controller.php +++ b/modules/layout/layout.controller.php @@ -246,8 +246,7 @@ // 파일 생성 $xml_buff = sprintf('%s', $this->getXmlTree($tree[0], $tree)); - $php_buff = sprintf('', $menu_id, $this->getPhpCacheCode($tree[0], $tree)); - debugPrint($php_buff); + $php_buff = sprintf('list = array(%s); ?>', $this->getPhpCacheCode($tree[0], $tree)); FileHandler::writeFile($xml_file, $xml_buff); FileHandler::writeFile($php_file, $php_buff); diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index 554ce48f7..299c1087b 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -166,6 +166,7 @@ $buff .= sprintf('$layout_info->menu->{%s}->name = "%s";',$id, $menus[$i]->name->body); $buff .= sprintf('$layout_info->menu->{%s}->maxdepth = "%s";',$id, $menus[$i]->maxdepth->body); $buff .= sprintf('$layout_info->menu->{%s}->xml_file = "./files/cache/layout/".$layout_srl."_%s.xml";',$id, $id); + $buff .= sprintf('$layout_info->menu->{%s}->php_file = "./files/cache/layout/".$layout_srl."_%s.php";',$id, $id); } $buff = '';