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

Using extends and with (like include)

Hi guys,

I am looking to extend a template, say a base inspect view, and I want to be able to pass configurations for that parent view (see example). This is possible in twig (I'm currently investigating migration from twig to volt). Maybe this can be achieved another way, if so, how would you recommend?

{% extends '@staff/base.inspect.twig'
    with {
        'width': 500,
        'columns': 2
    }
%}

Thanks, Dave.



85.5k
edited Aug '17

i dont think so.

If you are that good with twig and if i were you i would probably stick with twig .. you seems to be using a lof of functions that will probably never exist in Volt.

Volt needs some fixes and immprovements and probably they will happen, but i dont think it will be very soon. I still havent seen Q3 goals tho.

https://github.com/phalcon/incubator/tree/master/Library/Phalcon/Mvc/View/Engine