We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

How to render elements or controller's action in Volt?

Is it possible to write in pure Volt syntax?

<?php echo $this->elements->getMenu(); ?>

Can we include actions directly like in Symfony2 Twig or is Volt/Phalcon limited to including templates only?

{# Twig syntax to call route -> controller -> action -> view is processed #}
{{ render(url('acme_privacy')) }}


The same in Volt would be:

{{ elements.getMenu() }}

You can only include other templates using partial or include.