When it comes to CFSaveContent
, I have a common use case where I do something like this:
<cfsavecontent variable="htmlContent">
<cfinclude template="./cf-logic.cfm" />
</cfsavecontent>
<cfset fileWrite( htmlContent, "./generated.html" ) />
It would be nice if the CFSaveContent
tag had a file
option, so I could skip that last step:
<cfsavecontent file="./generated.html">
<cfinclude template="./cf-logic.cfm" />
</cfsavecontent>
Or, I mean, the best thing would also be if there as just some sort of renderToFile()
function:
renderToFile( "./cf-logic.cfm", "./generated.html" );
Anyway, just a random thought.