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.

Compiled files in Volt with large names

I had set a compiled folder for Volt, but now their compiled files name is INSANE. Here's an example:

%%var%%www%%gconves%%app%%vistas%%login%%index.phtml.compiled

Do you have any troubles with these names?



19.6k

No, but without setting a compiled folder the name is veeeeeeeery tiny compare to that. That's my concern.



19.6k
Accepted
answer
edited Aug '14

I solve it thanks to http://forum.phalconphp.com/discussion/469/volt-compiled-file-name (here, $templatePath is $compiledTemplate, $dirName is $compiled)

"compiledPath" => function ($compiledTemplate) {
            // Here you take the file name.
            $compiled = substr($rutaCompilada, strripos($compiledTemplate, "/") + 1);

            // Here you add the path and extension you want.
             return "../app/views/compileds/" . $compiled . ".compiled";
}