I am new to MG - but am trying to get the event-type syntax straight.
What I'm doing seems pretty simple, but the results are not as
expected. For simplicity, I have the event-type simply doing 'footer'
content for me - as defined as such (defining 2 footer pages - both
with value of 'footer'):
<event-types>
<event-type name="templatedPage">
<before>
<views>
<include template="pages/footer.cfm"
name="footer"/>
</views>
</before>
</event-type>
<event-type name="templatedPage2">
<before>
<views>
<include template="pages/footer2.cfm"
name="footer"/>
</views>
</before>
</event-type>
</event-types>
The below I have an even-handler defined with a defaultType of the
first templatedPage (footer)
<event-handlers defaultType="templatedPage">
That works well to get my 'results' template to be populated with the
footer variable which I can output as such:
<cfoutput>#viewCollection.getView("body")#</cfoutput>
However, overriding a specific event-handler is NOT displaying the
second footer as in:
<event-handler name="page.index" type="templatedPage2"><!-- HERE I AM
OVERRIDING THE DEFAULT TYPE -->
<broadcasts />
<results>
<result do="template.main" />
</results>
<views>
<include name="body" template="pages/index.cfm" />
</views>
</event-handler>
Instead of the text in my footer being 'This is the Footer2' which is
the content in pages/footer2.cfm I get the content from footer.cfm
'This is the Footer'. (I have started/stopped service, reload,
init=true etc.)
Also, If i override the event-type on the event-hander as in :
<event-handler name="page.index" type=""> (per the event-type
documentation) it will also show the 'templatedPage' event-type footer
content (instead of what I would expect to be NOTHING populated for
the footer variable).
This is from a brand new download of 'ModelGlue_3.0.final.178.zip'
from the site - and am running a prior 3.0 version on another project
and am seeing some inconsistencies there as well.
Please help -
Sincerely,
Kevin Penny
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---