Multi theme volt

Hi, im new in Phalcon and i want to know if there is any way to have multi theme volt, for example:

  • app/views/default/index.volt
  • app/views/christmas/index.volt
  • app/views/halloween/index.volt


27.4k

http://docs.phalconphp.com/en/latest/reference/volt.html#template-inheritance

  1. Create Volt inside the view service (I think you'll have that done).
  2. Create a .VOLT file that will act like a father layout (think on in as an HTML file when writting your code).
  3. Create a .PHTML file. This will be the action view. Extend ({% extends %}) from the file before, and write your code in the correct {% block %}. Note that you can do more template inheritance if you create more templates in a hierarchical way.