Assembling view-pages on the fly

0 views
Skip to first unread message

Zack Pitts

unread,
May 6, 2008, 7:29:47 PM5/6/08
to mach-ii-for...@googlegroups.com
I'm working on a CMS that will need to dynamically announce the events
necessary to fulfill each request and assemble the necessary views on the
fly.

The flow will be

1. Analyze URL to determine which pieces of content need to be assembled for
the given request (pre-process plug-in)
a. Look up which Mach-II events will handle retrieving those pieces of
content
b. Determine which views need to be called for the events

2. Announce the events

3. Render the views

I know I can use announceEvent() within my plug-in to dynamically queue the
events, but what's the best way to dynamically render the views? Should
each view be set up as a separate event handler to be queued (via
announceEvent()) at the end of the chain? If so, would this cause an
inadvisable performance hit? Other suggestions?

Thanks!

Zack Pitts

Peter J. Farrell

unread,
May 7, 2008, 1:16:22 AM5/7/08
to mach-ii-for...@googlegroups.com
Zack Pitts said the following on 5/6/2008 6:29 PM:

> I know I can use announceEvent() within my plug-in to dynamically queue the
> events, but what's the best way to dynamically render the views?
>
A filter can dynamically display a view by calling:
arguments.eventContext.displayView(event=arguments.event,
viewName="ViewName", contentArg="NameOfArg")

See the CFC API docs for more information:
http://www.mach-ii.com/index.cfm/go/resources/

.pjf

Reply all
Reply to author
Forward
0 new messages