* Add the config of view prefix.

This commit is contained in:
ChuJilu
2014-10-10 09:35:33 +08:00
parent 0433f34fb6
commit bf09d39eb2
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -269,7 +269,7 @@ class control
public function setViewPrefix()
{
$this->viewPrefix = '';
if($this->viewType == 'mhtml') $this->viewPrefix = 'm.';
if(isset($this->config->viewPrefix[$this->viewType])) $this->viewPrefix = $this->config->viewPrefix[$this->viewType] . '.';
}
//-------------------- View related methods --------------------//
@@ -292,7 +292,7 @@ class control
/* Set infix for view file in mobile or pc. */
$viewType = $this->viewType;
if($this->viewType == 'mhtml') $viewType = 'html';
if(isset($this->config->viewPrefix[$this->viewType])) $viewType = 'html';
/* The main view file, extension view file and hook file. */
$mainViewFile = $modulePath . 'view' . $this->pathFix . $this->viewPrefix . $methodName . '.' . $viewType . '.php';