Can someone tell me if there's a way to use cfhtml...
# cfml-general
d
Can someone tell me if there's a way to use cfhtmlhead from cfscript in CF 2018? This doesn't work, says Variable CFHTMLHEAD is undefined:
cfHtmlHead(text="#arrayToList(aList)#<br>");
d
Looks like just
htmlHead
maybe? https://cfdocs.org/cfhtmlhead
d
That page says it's Lucee only.
And it doesn't work.
s
you could add your own UDF to call it in script
Copy code
<cffunction name="cfHtmlHead">
    <cfhtmlhead attributecollection="arguments">
</cffunction>
d
Yes I know, thanks, just curious if I was missing some syntax variant that actually works.
s
not that i can see
a
@Dave Merrill that code you gave does work in CF2018, and does not give an error.
s
oops, i misspoke, i was looking at docs for cf10
a
Yeah that syntax was introduced with CF11.
s
and the codeblock above was posted in SO from…. @Adam Cameron!
Him. Don't trust him.
d
Gah, my bad. This particular app is still cf9 (!!!), upgrading soon.
As you were all.
😆 1
a
haha
OKw ell some of the code being in tags still is the least of yer worries, I reckon 😛
d
mmm
this patch isn't tags, it's new. but actually(tm), I was going to use cfhtmlhead as a sleazy logger that could run inside some query code, but I have a much better solution I just hadn't pulled into this project, until now, so, yay.