Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a CFHTMLHEAD equivalent for CFSCRIPT?

This question was asked and answered more than a year ago. Since then, ColdFusion 10 was released but documentation is poor. This question is strictly about ColdFusion 10 and CFSCRIPT.

I am interested in writing this code solely in CFSCRIPT with absolutely no CFHTMLHEAD tag being used.

<cffunction name="HTMLHead" output="false" returnType="void">
    <cfargument name="text" type="string" required="yes">
    <cfhtmlhead text="#text#">
</cffunction>

Here's how I think it should work

// CREATE PAGE TITLE 
function createPageTitle(Content) {
    LOCAL.Content = ARGUMENTS.Content;
    LOCAL.Content = "<title>#LOCAL.Content#</title>";
    LOCAL.Content = htmlhead(LOCAL.Content);
}

I cannot find any documentation on how this is done, but it seems like it would be one of the first things to be included in CFSCRIPT.

like image 949
Evik James Avatar asked Dec 06 '22 11:12

Evik James


1 Answers

I don't think there is. BUt have you looked at the CFScript Community Components project on GitHub? There is an implementation of cfhtmlhead there.

like image 58
Jason Dean Avatar answered Jan 02 '23 07:01

Jason Dean