Difference between revisions of "Load ADF Components into Site"
From ADF Docs
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
− | By default, when you configure a site to use the ADF, the latest version of all of the [[Library| 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]]. | + | By default, when you configure a site to use the ADF, the latest version of all of the [[Library| 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 == | == Load specific version of ADF Library Component == | ||
− | To load a specific version of an ADF Library component into the sites 'application.ADF' scope | + | To load a specific version of an ADF Library component into the sites 'application.ADF' scope you need to: |
+ | # Create a /lib/ directory within you sites /_cs_apps/ directory (e.g. /mySite/_cs_apps/lib/) | ||
+ | # Copy the original ADF Library Component into that /lib/ directory (e.g. /mySite/_cs_apps/lib/csData_1_0.cfc | ||
+ | # Change the copied file so that it extends the original | ||
+ | <source lang="cfm"> | ||
+ | <cfcomponent extends="ADF.lib.csData.csData_1_0">...</cfcomponent> | ||
+ | </source> | ||
+ | # Remove any methods you DO NOT WISH TO MODIFY | ||
+ | # Make modifications to the methods you would like to change | ||
+ | # Follow the instructions for [[Site Configuration (ADF.cfc)]]. | ||
+ | # [[Reset the ADF]] | ||
+ | |||
+ | == What does this mean? == | ||
+ | By making this modification, any code within your site that uses code similar to this: | ||
+ | <source lang="cfm"> | ||
+ | <cfset myData = application.ADF.csData.getStandardMetadata(pageID)> | ||
+ | </source> | ||
+ | Will use the component located within your /_cs_apps/lib/ directory instead of the one located in the /ADF/lib/ directory. | ||
[[Category: How-to Guide]] | [[Category: How-to Guide]] |
Latest revision as of 04:50, 15 April 2010
Overview
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:
- Create a /lib/ directory within you sites /_cs_apps/ directory (e.g. /mySite/_cs_apps/lib/)
- Copy the original ADF Library Component into that /lib/ directory (e.g. /mySite/_cs_apps/lib/csData_1_0.cfc
- Change the copied file so that it extends the original
<cfcomponent extends="ADF.lib.csData.csData_1_0">...</cfcomponent>
- Remove any methods you DO NOT WISH TO MODIFY
- Make modifications to the methods you would like to change
- Follow the instructions for Site Configuration (ADF.cfc).
- 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.