powtac
powtac

Reputation: 41080

Zend: How to nest different controllers into one big?

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?

Upvotes: 0

Views: 236

Answers (2)

Chris Williams
Chris Williams

Reputation: 12481

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.

Upvotes: 1

Derek Illchuk
Derek Illchuk

Reputation: 5658

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.

Upvotes: 1

Related Questions