views:

68

answers:

2

What are (the best) approaches for the Zend Framework to nest different controllers actions into one big one?

And how would I solve the following situation:
A link in my main big view calls an other view where I can select a specific value and come back automatically after selecting to the main view and pre-filling this selected value?

+1  A: 

You can run several actions in one shot using the ActionStack helper (it's there, a little down). I'm not sure about your second question.

Derek Illchuk
+1  A: 

You can execute additional controller/action combinations in the current controller/action's view by doing something like this:

// will execute the headerAction() function of the PageController with the default module
<?= $this->action('header', 'page', 'default') ?>

This is what we include in our layouts to render a common header on each page without having to include the prep for that in each controller's action and the layout logic in each layout phtml file. This will work in a regular view as well.

Chris Williams

related questions