Changes between Version 6 and Version 7 of QuickStart/6:AddingaSiteWideTemplate
- Timestamp:
- 12/21/09 21:35:06 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
QuickStart/6:AddingaSiteWideTemplate
v6 v7 5 5 However, what if we always want to run an additional event handler? Easy: don't give it a NAME attribute. 6 6 7 If you look at your !ModelGlue.xml file, there's an event handler named "template.main ."It doesn't do much: no messages, no results, just a single <include>.7 If you look at your !ModelGlue.xml file, there's an event handler named "template.main". It doesn't do much: no messages, no results, just a single <include>. 8 8 9 The include, though, is special. Open it up. (/translator/views/ main.cfm).9 The include, though, is special. Open it up. (/translator/views/templates/main.cfm). 10 10 11 See Line !#16? "viewcollection.getView('body')"? What's with that?11 See Line !#16? 'viewCollection.getView("body")'? What's with that? 12 12 13 13 Model-Glue makes it easy to display the rendered HTML from one view inside of another. In all of your .CFM view templates, a variable named "viewcollection" is available. To display the rendered HTML from a prior view, simply run getView(), passing it the value of the desired view's NAME attribute. … … 28 28 29 29 I'd show you the XML, but I '''did''' say there was a quiz at the end. When you've added the result and gotten the sitewide template to work, you've finished the Quickstart! 30 30 31 ---- 31 32 32 Back [wiki:QuickStart/5:ValidatingaForm #Quickstart5:ValidatingaFormQuickstart 5: Validating a Form]33 Back [wiki:QuickStart/5:ValidatingaForm Quickstart 5: Validating a Form]
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)