We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 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')) }}


98.9k

The same in Volt would be:

{{ elements.getMenu() }}

You can only include other templates using partial or include.