Take a look at this url: https://github.com/phalcon/invo/tree/master/app/views
That shows the structure for the views in the Invo (demo) application. You'll see there's an index.volt in that root folder, if you open it, there's only a few lines of code in there. Primarily things related to the most basic elements. That's what the root template is for. The {{ content() }}
call you see will do the including of templates for you.
If you then look in the layouts
folder you'll see the next level of hierarchy. Each file in that folder related to a controller and dresses up the page a little more. These templates too have a {{ content() }}
call in there, which ends up loading the method specific template. Which lets say for the about controller with index action can be found in about/index.volt
.
So in short: /index.volt
loads /layouts/[controllername].volt
loads /[controllername]/[action].volt
. Each load happens by using the content()
call.
That's a somewhat crude explanation, but the idea here is that I feel your approach needs adjusting. Extending from a base.volt
is a somewhat faulty approach, I think.