IsHomeCircuit()
Last updated June 26, 2002
Version: 1 | Requires: CF5 | Library: UtilityLib
Description:
Useful function for applications in Fusebox 2 to determine whether a template is calling itself or not. If a template is calling itself, isHomeCircuit will return true, otherwise, it will return false.
Return Values:
Returns a boolean.
Example:
<cfif isHomeCircuit()>
I am at home.
<cfelse>
I am not at home.
</cfif>
Parameters:
No arguments.
Full UDF Source:
/**
* a template calling itself is at home, otherwise, its not at home.
*
* @return Returns a boolean.
* @author Joshua Shaffner (joshua@curlyweb.com)
* @version 1, June 26, 2002
*/
function IsHomeCircuit(){
var baseDir=getDirectoryFromPath(getBaseTemplatePath());
var currDir=getDirectoryFromPath(getCurrentTemplatePath());
if(baseDir is currDir) return true;
else return false;
}
Search CFLib.org
Latest Additions
Raymond Camden added
QueryDeleteRows
November 04, 2017
Leigh added
nullPad
May 11, 2016
Raymond Camden added
stripHTML
May 10, 2016
Kevin Cotton added
date2ExcelDate
May 05, 2016
Raymond Camden added
CapFirst
April 25, 2016