Here's one used on
cfwheels.org. Basically, we can link to a function's documentation information anywhere on the site by running one of these lines of code:
#functionLink("findAll")#
or
#functionLink(functionName="exists", mask="hasXXX")#
The reason for the optional mask argument is that our documentation generator doesn't pick up the dynamic association methods described in the Associations chapter.
Here's the code in views/helpers.cfm:
<cffunction name="functionLink" hint="Builds a link to a given function's documentation.">
<cfargument name="functionName" type="string" hint="Name of function.">
<cfargument name="mask" type="string" required="false" default="" hint="Name to display instead of the `functionName` argument. Useful for linking `addXXX()` to `updateByKey()`, for example.">
<cfset var loc = {}>
<cfif Len(arguments.mask) gt 0>
<cfset loc.displayName = arguments.mask>
<cfelse>
<cfset loc.displayName = arguments.functionName>
</cfif>
<cfreturn linkTo(text="<code>#loc.displayName#()</code>", route="function", title=arguments.functionName)>
</cffunction>