Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to specify a template engine to save files with the extension PHP to what some other place

When I start getting

/views/mytpl.phtml /views/mytpl.phtml.php

mytpl.phtml.php in my way, you can override their storage?

edited Oct '14

Sure, just set in when your register your view service:

// Setting up the view component
$di->set('view', function() use ($config) {
    $view = new Phalcon\Mvc\View();
    $view->setViewsDir($config->application->viewsDir); // HERE PATH TO DIR WHERE YOU WOLD LIKE TO STORE COMPILED TEMPLATES


Pavlo Sadovyi, It's for installing views

I'm doing my mind and everything is together.


Why do not you like $view->setCompilingDir ???


Oh, sorry me... I mean "compiledDir", but copy-paste bullshit.