view action helper

Hi everyone,

I'm looking for some solution on how to render an action into another action? For example in Zend Framework in each action I can call <?= $this->action('action', 'controller','module') ?>

In volt I can only render another volt view file: {{ partial('path_to_view/file') }}

when I have some logical code into this view or I send some vars - this command doesn't call the controller.

Any ideas?



7.9k

volt doesn't have method component

Undefined function 'component'



20.3k

Maybe an alternative solution will be creating a Component with a function that returns a string of the part of the action's view that you want to render (I do that to present my project's navBar of Bootstrap in multiple controllers actions).

But I think it won't be useful for you (unless that action's view has little things you want to partial render).