yii y smarty

buenos dias a todos! esta es mi segunda consulta al foro , vamos a ver si sale tan bien como la primera :rolleyes:

entrando en materia , no consigo hacer funcionar smarty en yii , hago todo lo que dicen en el smarty-view-renderer, incluso me metí en github para descargarme la ultima version.

total que lo unico que consigo es este error:


CException


Alias "application.extensions.yiiext.renderers.smarty.ESmartyViewRenderer" is invalid. Make sure it points to an existing PHP file.


/var/www/yii/framework/YiiBase.php(318)


306         if($isClass && (class_exists($className,false) || interface_exists($className,false)))

307             return self::$_imports[$alias]=$className;

308 

309         if(($path=self::getPathOfAlias($alias))!==false)

310         {

311             if($isClass)

312             {

313                 if($forceInclude)

314                 {

315                     if(is_file($path.'.php'))

316                         require($path.'.php');

317                     else

318                         throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file.',array('{alias}'=>$alias)));

319                     self::$_imports[$alias]=$className;

320                 }

321                 else

322                     self::$classMap[$className]=$path.'.php';

323                 return $className;

324             }

325             else  // a directory

326             {

327                 if(self::$_includePaths===null)

328                 {

329                     self::$_includePaths=array_unique(explode(PATH_SEPARATOR,get_include_path()));

330                     if(($pos=array_search('.',self::$_includePaths,true))!==false)




yo creia que seria mucho mas facil pero veo que algo se me escapa :huh:

alguien me puede iluminar en los pasos que tengo que hacer y como hacerlos??????

Muchas gracias a todos!!!

me contesto a mi mismo y asi tenemos el como hacerlo:

nos descargamos la versión mas reciente de smarty-render (en yiiframeworek esta desactualizada)

descomprimimos como dicen:

Extract the release file under protected/extensions.


Download and extract libs folder contents of Smarty package under protected/vendors/Smarty.


Add the following to your config file 'components' section:

'viewRenderer'=>array(

  'class'=>'application.extensions.yiiext.ESmartyViewRenderer', <- ESTA LINEA HAY QUE MODIFICARLA

    'fileExtension' => '.tpl',

    //'pluginsDir' => 'application.smartyPlugins',

    //'configDir' => 'application.smartyConfig',

    //'prefilters' => array(array('MyClass','filterMethod')),

    //'postfilters' => array(),

    //'config'=>array(

    //    'force_compile' => YII_DEBUG,

    //   ... any Smarty object parameter

    //)

),

en el raiz creamos una carpeta llamada templates donde meteremos los .tpl

y para terminar modificamos los php añadiendo siempre la ultima linea


$smarty->display("templates/NOMBREDELFICHERO.tpl");