0

I'm 99% sure this is possible, having seen it in a forum some time ago. I want to use a XML style file for CfChart that is in the same folder as the CFM file that's making the chart.

I know that in <cfchart format="png" style="XXX"> the XXX will look in my charting/style folder of my coldfusion root folder. But I want to override that and look in the directory I'm running my CFM from.

Leigh
  • 28,765
  • 10
  • 55
  • 103
henonChesser
  • 167
  • 1
  • 14

1 Answers1

0

I figured out a dirty way to do it, is just read the XML and use it as a variable.... something like this:

 <cfset strPath = GetDirectoryFromPath( GetCurrentTemplatePath()) />


<cffile action="read" file="#strPath#/nutrientGraph.xml" variable="graphStyle">
henonChesser
  • 167
  • 1
  • 14
  • 1
    No need to read it into a string. As mentioned in the other thread, just use a relative file path. For example, `` – Leigh Sep 09 '14 at 21:50