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

Volt - Embed Blocks in Children Templates

Saw a previous discussion about block embedding. Is there any ETA on when this might get implemented?

At this time our VIEW templates extends the CONTROLLER template, but that template INCLUDES header and footer type partials instead of extending a MAIN layout.

Main reason is children do not allow outside HTML around blocks and the other it was very difficult to use blocks the way we wanted because we could embed

Wanted this effect

  • block blogside
  • block widget1 / endblock
  • block widget2/ endblock
  • block widget2 / endblock
  • endblock

you have to understand that it is Hierarchical Rendering¶ and Template Inheritance¶.

Not a definition problem, it is an ongoing request.

https://github.com/phalcon/cphalcon/issues/329