We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Volt compiler path

Hi,

Is any way that Volt compiler compile volt templates to tree structure?

For example: /views/index.volt => /cache/index.phtml /views/layouts/main.volt => /cache/layouts/main.phtml /views/index/index.volt => /cache/index/index.phtml /views/session/register.volt => /cache/session/register.phtml



98.9k

No, there is no way to compile volt template to a tree structure. I'm think the main reason is because of the number of stats required to perform this operation will be doubled.

  1. Check if the directory exists, if not create the directory
  2. Check if the Volt template has a modification date greater than the compiled counterpart, compile it again

I think that stats number should be the same. Cache tree stucture equal to tree sructure of View folder could help novice learn Volt, and everybody check how is going after compilation. If it is no problem please add any switch to compile to tree structure, please :)

Sometimes i need to check how is going and finding right file is a little problem and tabs IDE is very large and uncomfortable.

Thank you very much :)