Changeset 15797


Ignore:
Timestamp:
2007/09/20 20:12:29 (17 years ago)
Author:
adachi
Message:

デフォルトテンプレート変数を設定

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-templates/data/class/SC_View.php

    r15790 r15797  
    3232        // Smarty½é´ü²½ 
    3333        $this->initSmarty(); 
     34 
     35        $this->tplName = $this->getTemplateName(); 
     36        $this->assignDefaultVars(); 
    3437 
    3538        // ¥µ¥¤¥È¾ðÊó¤òassign¤¹¤ë 
     
    9396        $arrDefaultParams = array( 
    9497            'URL_DIR' => URL_DIR, 
    95             'TPL_PKG_URL' => URL_DIR . USER_DIR . $this->getTemplateName() . '/' 
     98            'TPL_PKG_URL' => URL_DIR . USER_DIR . TPL_PKG_DIR . $this->tplName . '/' 
    9699        ); 
    97100        $this->assignArray($arrDefaultParams); 
     
    221224 
    222225    /** 
    223      * »ÈÍѤ·¤Æ¤¤¤ë¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸¤Î¥Ñ¥¹¤ò¼èÆÀ¤¹¤ë 
     226     * »ÈÍѤ·¤Æ¤¤¤ë¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ò¼èÆÀ¤¹¤ë 
    224227     */ 
    225228    function getTemplateName() { 
     229        if (!defined('DEFAULT_DSN')) return null; 
     230 
    226231        $objQuery = new SC_Query(); 
    227232        $arrRet = $objQuery->select('top_tpl', 'dtb_baseinfo'); 
     
    252257    function initDisplay($template) { 
    253258        $tpl_mainpage  = $this->_smarty->get_template_vars('tpl_mainpage'); 
    254         $template_name = $this->getTemplateName(); 
     259        $template_name = $this->tplName; 
    255260 
    256261        // ¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë¾ì¹ç 
     
    289294    function initDisplay($template) { 
    290295        $tpl_mainpage  = $this->_smarty->get_template_vars('tpl_mainpage'); 
    291         $template_name = $this->getTemplateName(); 
     296        $template_name = $this->tplName; 
    292297 
    293298        // ¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë¾ì¹ç 
Note: See TracChangeset for help on using the changeset viewer.