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 can ı include another volt rendered data

Hi,
I want include another dynamic volt in volt file. but want get with $this->view->someone datas without parameter.
Example:
someControllerActon: $this->view->someone
someVolt : {{someone}}
using partial('') get blank page. partial('', parameter) getting true.
But ı use one more page this partial.

Hi

Im not sure exactly what you mean, but in generall to add dynamic content in volt, partial is the way to do someyhing like:

{% set partialName = 'mycontent' %}
{{ partial('partials/'~partialName) }}

Guess you read https://docs.phalcon.io/en/latest/reference/volt.html#view-integration already :)



43.9k

Hi,

note that you can pass parameters to partials.