RE: [coldbox:11195] cfinclude doubling / viewpath undefined

I know I’m side stepping your question a bit to offer an alternate suggestion, but instead of just including a file which declares a function in the variables scope, can you wrap up the function as a method in a utility CFC and inject that CFC where you need it? That should be a bit cleaner as far as what scope that function is getting dumped into.

As far as why you’re getting the duplicated routine errror-- are you expecting that file to be included twice on a given page request? Maybe a bit of debugging in the file will help you figure out if and why it’s being called twice.

Also, a more hackish version of my first suggestion would be to wrap those function calls in an if like so:

<cfif not structKeyExsts(varables,“printOut”)>