开发者

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 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜