开发者

Zend: How to nest different controllers into one big?

开发者 https://www.devze.com 2022-12-13 22:05 出处:网络
What are (the best) approaches for the Zend Framework to nest different controllers actions into one big one?

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 autom开发者_StackOverflow中文版atically after selecting to the main view and pre-filling this selected value?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号