Changeset 16272


Ignore:
Timestamp:
2007/10/05 20:37:33 (17 years ago)
Author:
nanasess
Message:

デザイン管理のヘッダ, フッタ編集が反映されるよう修正

Location:
branches/feature-module-update/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/Smarty/templates/default/site_main.tpl

    r16044 r16272  
    1313<!--{* ▼HEADER *}--> 
    1414<!--{if $arrPageLayout.header_chk != 2}--> 
    15 <!--{assign var=header_dir value="`$smarty.const.TEMPLATE_DIR`header.tpl"}--> 
    16 <!--{include file= $header_dir}--> 
     15<!--{include file= $header_tpl}--> 
    1716<!--{/if}--> 
    1817<!--{* ▲HEADER *}--> 
     
    111110<!--{* ▼FOTTER *}--> 
    112111<!--{if $arrPageLayout.footer_chk != 2}--> 
    113 <!--{include file="`$smarty.const.TEMPLATE_DIR`footer.tpl"}--> 
     112<!--{include file=$footer_tpl}--> 
    114113<!--{/if}--> 
    115114<!--{* ▲FOTTER *}--> 
  • branches/feature-module-update/data/class/SC_View.php

    r16266 r16272  
    7777        $this->assign("TPL_DIR", URL_DIR . USER_DIR 
    7878                      . "templates/" . TEMPLATE_NAME . "/"); 
     79 
     80        // ヘッダとフッタを割り当て 
     81        $header_tpl = USER_INC_PATH . "header.tpl"; 
     82        $footer_tpl = USER_INC_PATH . "footer.tpl"; 
     83 
     84        // ユーザー作成のテンプレートが無ければ, 指定テンプレートを割り当て 
     85        if (!$this->_smarty->template_exists($header_tpl)) { 
     86            $header_tpl = TEMPLATE_DIR . "header.tpl"; 
     87        } 
     88        if (!$this->_smarty->template_exists($footer_tpl)) { 
     89            $footer_tpl = TEMPLATE_DIR . "footer.tpl"; 
     90        } 
     91 
     92        $this->assign("header_tpl", $header_tpl); 
     93        $this->assign("footer_tpl", $footer_tpl); 
    7994    } 
    8095 
  • branches/feature-module-update/data/class/pages/admin/design/LC_Page_Admin_Design_Header.php

    r15688 r16272  
    8484                mkdir($pre_DIR); 
    8585            } 
    86             copy(USER_INC_PATH . "header.tpl", $pre_DIR . "header.tpl"); 
    87             copy(USER_INC_PATH . "footer.tpl", $pre_DIR . "footer.tpl"); 
     86 
     87            // ユーザーパスにテンプレートが存在しなければ, 
     88            // 指定テンプレートから読み込む 
     89            $header_tpl = USER_INC_PATH . "header.tpl"; 
     90            if (!is_file($header_tpl)) { 
     91                $header_tpl = TEMPLATE_DIR . "header.tpl"; 
     92            } 
     93            $footer_tpl = USER_INC_PATH . "footer.tpl"; 
     94            if (!is_file($footer_tpl)) { 
     95                $footer_tpl = TEMPLATE_DIR . "footer.tpl"; 
     96            } 
     97 
     98            copy($header_tpl, $pre_DIR . "header.tpl"); 
     99            copy($footer_tpl, $pre_DIR . "footer.tpl"); 
     100 
    88101 
    89102            // ヘッダーファイルの読み込み 
    90             $header_data = file_get_contents(USER_INC_PATH . "header.tpl"); 
     103            $header_data = file_get_contents($header_tpl); 
    91104            // フッターファイルの読み込み 
    92             $footer_data = file_get_contents(USER_INC_PATH . "footer.tpl"); 
     105            $footer_data = file_get_contents($footer_tpl); 
    93106 
    94107        } 
Note: See TracChangeset for help on using the changeset viewer.