Error: Failed to load processor TOC
No macro or processor named 'TOC' found

Scaffolds: Customizing Generated CFML

Scaffold tags cause certain files to be generated, such as lists, views, and edit forms. This generated code is placed into a directory governed by the generatedViewMapping property of the modelglue.modelGlueConfigurationBean in ColdSpring.xml.

Advanced note: The value of this setting is appended to the ViewMappings setting, making this directory the last-searched directory when an include tag is encountered.

By default, the following .CFM templates are generated for each scaffolded table:

  1. Display.Table.cfm - Displays a single record from the table
  2. Form.Table.cfm - Displays an edit form for a single record from the table
  3. List.Table.cfm - Displays a list of records from the table

To customize the generated CFML, you cannot edit these files directly. This would cause them to be overwritten the next time the framework is reloaded.

To edit a view, simply copy it into the /views directory of your application. At that point, your copy will not be overwritten. If additional database columns are added, you'll be able to use the generated code as a source from which you can copy and paste the new column's CFML.

Advanced note: They can alternatively be copied into any directory listed in the ViewMappings setting.