Custom Code Object

Sometimes you will have the need to insert some custom ColdFusion code into your web site. Use this tag to specify the name of the file to include into your template.  A good example of custom code is inserting ColdFusion code that should be run every time the page is viewed.  You can enter ColdFusion code directly into a template, but that code is run when the page is made, not when it is viewed.

<cfmodule template="../actionfiles/createcustomcodeobject.cfm" customcodefile="randomheadersmall.cfm" >

NOTE: Change the filename of the custom code file parameter to the coldfusion file that contains your custom code. This file should be placed in the primarytemplatefiles/customcode folder. If this folder does not exist, create the folder customcode then ftp your custom ColdFusion code into it.

 

Application.cfm Changes

Should you need to add anything to the Application.cfm you can add it to the /actionfiles/config/ file.  Choose the right file for your CFMX version.  This file is automatically included within Application.cfm and will automatically include any of your additions. Typically your additions would be at the end of this file.

 

Application and Session Information

Savvy stores its application information (all the includes.cfm variables, etc) in a structure called application.SavvyCM.  All session information is stored in session.Savvy structure.

To determine what information is stored in your version of savvy create a debug.cfm file and put into it:

<cfdump var="#application.SavvyCM#">

<cfdump var="#session.Savvy#">

Then run that file in the root of the Savvy Install.