So after writing some pseudo adapter for View engine to render views from modules directory and converting my templates to not extend twice I have begin to realize this system is not for me. Neither volt nor whole View system suits my needs.
So question is pretty simple, can i completely discard "View" and write my own version that uses twig/volt? Or is there a simpler way to accomplish this?
My requirements are as follows: For View System
- Have a total control from where templates are being loaded a) first it should check the active module views dir which is app/modules/Vendor/Module/Views b) if template is not there, check in global templates directory which is app/views c) if template is not there, check core module views directory: app/modules/Vendor/Core/Views
- Allow cross module extend/include similar to symfony ex {% extends 'modulefullname:viewSubDir/viewFile' %}
- include/extend from templates must follow the same routine For template system
- Ability to access all services
- Ability to pass variables from controllers
- Ability to extend templates as many times as I like
- Volt/Twig syntax
From what I have seen, i could simply(???) use symfony/templating but I am kinda new to phalcon and didn't found any examples of such hybrid app. Thanks in advance.