예제 #1
0
 private function getDetailTpl($tpl)
 {
     $tplPath = CommonUtility::getThemePath(['page', $tpl]);
     if (TFileHelper::exist($tplPath)) {
         return $tpl;
     }
     return 'detail_default';
 }
예제 #2
0
 public function getTpl($chnId, $tplType)
 {
     $ret = TFileHelper::buildPath(['model_default', str_replace('_tpl', '_default', $tplType)]);
     $cachedChannels = LuLu::getAppParam('cachedChannels');
     if (isset($cachedChannels[$chnId])) {
         $channelModel = $cachedChannels[$chnId];
         $table = $channelModel['table'];
         $tplName = $channelModel[$tplType];
         $tplPath = CommonUtility::getThemePath(['content', $table, $tplName]);
         if (TFileHelper::exist($tplPath)) {
             $ret = TFileHelper::buildPath([$table, $tplName]);
         } else {
             LuLu::info($tplPath . ' does not exist', __METHOD__);
         }
     }
     return $ret;
 }