Minor change about twig alias.

This commit is contained in:
Qiang Xue
2013-04-30 10:23:35 -04:00
parent 06fa0259b5
commit 44c1534e71

View File

@ -24,7 +24,7 @@ class TwigViewRenderer extends ViewRenderer
/**
* @var string the directory or path alias pointing to where Twig code is located.
*/
public $twigPath = '@app/vendors/Twig';
public $twigPath = '@Twig';
/**
* @var string the directory or path alias pointing to where Twig cache will be stored.
@ -44,7 +44,9 @@ class TwigViewRenderer extends ViewRenderer
public function init()
{
Yii::setAlias('@Twig', $this->twigPath);
if (!isset(Yii::$aliases['@Twig'])) {
Yii::setAlias('@Twig', $this->twigPath);
}
$loader = new \Twig_Loader_String();