Load ADF Components into Site

From ADF Docs
Jump to: navigation, search


By default, when you configure a site to use the ADF, the latest version of all of the ADF Library Components are loaded into the sites application.ADF memory space. Loading the ADF Library components into the site is controlled in the Site Configuration (ADF.cfc).

Load specific version of ADF Library Component

To load a specific version of an ADF Library component into the sites 'application.ADF' scope you need to:

  1. Create a /lib/ directory within you sites /_cs_apps/ directory (e.g. /mySite/_cs_apps/lib/)
  2. Copy the original ADF Library Component into that /lib/ directory (e.g. /mySite/_cs_apps/lib/csData_1_0.cfc
  3. Change the copied file so that it extends the original
  <cfcomponent extends="ADF.lib.csData.csData_1_0">...</cfcomponent>
  1. Remove any methods you DO NOT WISH TO MODIFY
  2. Make modifications to the methods you would like to change
  3. Follow the instructions for Site Configuration (ADF.cfc).
  4. Reset the ADF

What does this mean?

By making this modification, any code within your site that uses code similar to this:

  <cfset myData = application.ADF.csData.getStandardMetadata(pageID)>

Will use the component located within your /_cs_apps/lib/ directory instead of the one located in the /ADF/lib/ directory.