2009年1月27日星期二

[fw-mvc] Best approach?

Which approach do you use to include content for headers, footers,
sidebars, etc. in /application/layouts/layout.phtml?

Option #1:
Working within one action, storing content (header, footer, sidebar,
etc.) in variables, and echoing the value of those variables in
layout.phtml

Option #2
Forwarding ($this->_forward) from one action to another, having each
action set the value of the layout.phtml variable that it's
responsible for

Option #3
Using action stacks ($this->_helper->actionStack) to queue a series of
actions, having each action set the value of the layout.phtml variable
that it's responsible for

没有评论: