<cfcomponent output="true" hint="I define application settings and event handlers."> <!--- Define application settings. ---> <cfset THIS.Name = "TagPathDemo" /> <cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 0, 15 ) /> <!--- Define custom mappings. These need to be set on EVERY page request. Put in psuedo constructor so all events can leverage them. ---> <cfset THIS.Mappings[ "/com" ] = ( GetDirectoryFromPath( GetCurrentTemplatePath() ) & "components\" ) /> <!--- Try to execute the tag check custom tag. If this fails (throws an exception), then we need to initialize the custom tag paths. If it DOES work, then the paths have been initialized and cached. ---> <cftry> <!--- This tag doesn't do anything. ---> <cf_checktagpaths /> <!--- Tag failed - Define custom tag paths. ---> <cfcatch> <cfset THIS.CustomTagPaths = ( GetDirectoryFromPath( GetCurrentTemplatePath() ) & "tags\" ) /> </cfcatch> </cftry> </cfcomponent>