Displaying different data with the same view

0 views
Skip to first unread message

Brian Pickens

unread,
Sep 25, 2008, 5:59:23 PM9/25/08
to Mach-II for CFML
Hi guys,

Sorry I haven't been around on the list lately. I've been steadily
developing our Mach-ii cms application, which by the way is set to be
released into the wild hopefully by the end of the month. Ill be sure
to post links when it does. :)

So, here is my question:
Is there a way to reuse the same view to display different data both
within the same event?

We have a structure of 'modules' or views that are put together in a
page as the different layout chunks that display different data/news/
images, whatever. I have a module (view) that simply displays some
images. What I want to do is reuse this module to display different
images from a different source (different event-arg) elsewhere on the
page.

Any insight on this would be very appreciated. :)

Peter J. Farrell

unread,
Sep 25, 2008, 6:05:33 PM9/25/08
to mach-ii-for...@googlegroups.com
Brian Pickens said the following on 9/25/2008 4:59 PM:
It could be as simple as this:

<notify listener="something" method="getImagesA" resultArg="images"/>
<view-page name="displayImages" contentArg="imagesA"/>
<notify listener="something" method="getImagesB" resultArg="images"/>
<view-page name="displayImages" contentArg="imagesB"/>

Commands are run in order, so you can just place the results of the
notify calls in the same resultArg and then render the view immediately
after. Then run the another notify and then render with the same view.

.pjf

Brian Pickens

unread,
Sep 25, 2008, 6:13:38 PM9/25/08
to Mach-II for CFML
ah, ha...

hehe figures something so simple would elude me. I just assumed it was
going to be a super complicated mess of code!
Reply all
Reply to author
Forward
0 new messages