inheritance in partials - controller for sidebar?

I plan to build a website that have 2 columns. I want to use 2 controller at a time. One for main columns and other for sidebar. How can i do this with volt?



30.7k
edited May '14

Hi, "I want to use 2 controller at a time" : this is not possible.

You will have to use volt "block" definition (such as "sidebar" and "main"). If your sidebar will be "static" (meanning, will not change from a controller to an another) than you can define its content in your ControllerBase, if it change per controller, then define its content in each controller, ...

you can also use template inheritance http://docs.phalconphp.com/en/latest/reference/volt.html#template-inheritance wich is a pretty cool feature