Changes between Initial Version and Version 1 of HowTos/HowToUseScaffolds/CustomizingScaffoldXslFiles

Show
Ignore:
Timestamp:
04/15/09 19:43:30 (17 years ago)
Author:
trac (IP: 127.0.0.1)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTos/HowToUseScaffolds/CustomizingScaffoldXslFiles

    v1 v1  
     1= Customizing Scaffold .XSL Files = 
     2 
     3It's possible to entirely change the View CFML that scaffold tags generate. All involve editing .XSL files, which is way beyond the scope of this guide, but not altogether complicated. 
     4 
     5There are three ways to customize the .XSL: 
     6 
     7== Editing Default .XSL files == 
     8 
     9If you explore the /!ModelGlue/unity/xsl directory, you'll see that there are .XSL files that define the CFML to be generated when a like-named scaffold is added to an application. 
     10 
     11Editing these directly changes the behavior of all of your Model-Glue applications. 
     12 
     13== Creating New .XSL files == 
     14 
     15By creating your own .XSL files, you can again change the behavior of all scaffolds in all Model-Glue applications. To "tell" a given scaffold to use your custom .XSL file, do the following: 
     16 
     17  1. Open /!ModelGlue/unity/config/Configuration.xml 
     18  1. Find the "eventHandlerFactory" bean 
     19  1. In the map that defines the !EventHandlerTypes constructor argument, change the .xsl files listed to point to your custom .XSL files 
     20 
     21Editing these directly changes the behavior of all of your Model-Glue applications. 
     22 
     23== Application-specific .XSL files == 
     24 
     25To change the .XSL files used by a single Model-Glue applications, copy the entire !EventHandlerFactory bean from /!ModelGlue/unity/config/Configuration.xml into your application's !ColdSpring.xml file. 
     26 
     27Then, follow the instructions in "Creating New .XSL Files," editing your !ColdSpring.xml's !EventHandlerFactory settings instead of those found in /!ModelGlue/unity/config/Configuration.xml.