2009年4月30日星期四

Re: [fw-mvc] Zend_Layout with multiple contentKeys

calling $controller->render(null, 'your-action-content-key'); seems to be for this (or do i miss sthg?).
So far, worked for me quite well.
Remy

On Thu, Apr 30, 2009 at 5:06 PM, Jurian Sluiman <subscribe@juriansluiman.nl> wrote:
Hi all,
I'm quite new to ZF but manage to create some complex systems in a sort time.
One thing I don't get is creating content into more than one content key from
Zend_Layout.

I want to dispatch more things in the dispatch loop. Therefore, I have a
plugin with a postDispatch() hook. It looks if there need to be an iteration
again, it sets the request object with the new data and reset the dispatched
flag.
The content of both (or even more) loops should not always be stored in the
same key (default: content). It is possible to have one action stored in the
key "one" and the second one in "two". To manage it I created a preDispatch()
hook which sets the content key (setContentKey()) before each dispatch (of
course only when it's defined to have a custom content key).

The result is not what I want: all the content is appended into one key, the
last one which is set through setContentKey().

How is it possible to manage the result I'd like? Thanks in advance for any
help!
Best regards,
Jurian Sluiman


没有评论: