Hi Chuck,

The config and code you posted looks fine to me -- the views are
rendered in order, and any view will indeed be able to access prior
views via the viewCollection, so this should work (and the debug info
does indicate that all 3 views were processed).

So just to clarify, when the page.index event is run, the only HTML
that is displayed is the contents of the footer.cfm file, is that
correct? What happens if you comment out the footer include tag?

--
Ezra Parker



On Wed, Nov 11, 2009 at 2:41 PM, Chuck <[email protected]> wrote:
>
> I just posted a bug question even tho similar this is an event flow
> question.
>
> My output page isn't as I expect it to be.  I expect my main template
> to be executed with all the viewCollection calls to be embedded, but
> it is completely ignored.
>
> Here's my ModelGlue.xml code for a basic index.cfm call.
>
> <event-handler name="page.index">
>        <broadcasts />
>        <results>
>                <result do="template.main" />
>        </results>
>        <views>
>                <include name="body" template="pages/index.cfm" />
>        </views>
> </event-handler>
>
> <event-handler access="private" name="template.main" type="">
>        <broadcasts>
>                <message name="templates.footer" />
>        </broadcasts>
>        <views>
>                <include name="footer" template="templates/footer.cfm" />
>                <include name="main" template="templates/main.cfm" />
>        </views>
> </event-handler>
>
> The debug output
> 751ms   Views   Rendering view "body" (pages/index.cfm)
>        <include name="body" template="pages/index.cfm" />
> 751ms   Views   Rendering view "footer" (templates/footer.cfm)
>        <include name="footer" template="templates/footer.cfm" />
> 766ms   Views   Rendering view "main" (templates/main.cfm)
>        <include name="main" template="templates/main.cfm" />
> 766ms   Event Queue     Queueing event handler: modelglue.onRequestEnd
>
> What I interpret is that main gets all the viewCollection.GetView()
> options, but only the footer is output, everything else is ignored.
> Main looks like,
>
> <html>
>
> <head>
>        <link rel="stylesheet" type="text/css" href="css/stylesheet.css"></
> link>
>        <title>SeaRisen - Communication Solutions</title>
> </head>
>
> <body>
> Main Template<br>
>
>        <cfoutput>#viewCollection.getView("body")#</cfoutput>
>
>        <div id="footer">
>                <cfoutput>#viewCollection.getView("footer")#</cfoutput>
>
>        </div>
>
> </body>
>
> </html>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to