[[TOC(heading=Training Section Contents, Training*)]] = Section 8: Extending Model-Glue = The Model-Glue framework is highly extensible. If you don't like the way Model-Glue handles a certain function, you can override Model-Glue. This is a simple process because Model-Glue uses !ColdSpring under the covers. In this walk-through, we will make Model-Glue use a custom scaffold template without actually modifying Model-Glue framework files. 1. Create a new directory in /PlantOMatic/model called scaffoldTemplates 2. Open /ModelGlue/gesture/modules/scaffold/beans, copy the following files and paste them into the newly created scaffoldTemplates directory: * /ModelGlue/gesture/modules/scaffold/beans/Edit.cfc * /ModelGlue/gesture/modules/scaffold/beans/List.cfc 3. Open each file and change the name attribute in the view tag: {{{ tag: {{{ }}} 5. Next, open /PlantOMatic/config/ColdSpring.xml and change: {{{ false }}} To: {{{ true }}} 6. In the same !ColdSpring.xml file paste in the following XML: {{{ PlantOMatic.model.scaffoldTemplates.Edit true true Form. .cfm PlantOMatic.model.scaffoldTemplates.List true true List. .cfm }}} == Putting It All Together == Test your code by visiting [http://localhost/PlantOMatic/?event=Plant.List http://localhost/PlantOMatic/?event=Plant.List] You should have a list of plants using the custom look and feel of our PlantOMatic application: [[Image(training08-1.png, nolink)]][[BR]] '' Plant List '' In this walk-through we overrode default behavior of the Model-Glue framework simply by using !ColdSpring. The reason why this worked is because Model-Glue uses !ColdSpring internally to configure itself. Since beans in !ColdSpring are referenced by name, and because application specific !ColdSpring bean definitions load after the Model-Glue internal definitions, you can override pretty much any behavior of Model-Glue. If you want to find the names of overridable beans look in /ModelGlue/gesture/configuration/ModelGlueConfiguration.xml. ---- Back: [wiki:Training/Section07 Training Section 7: Crossing the Generational Gap]