[thelist] Re: cfhtmlhead tag
David Shadovitz
david_shadovitz at xontech.com
Wed Jul 19 19:18:18 CDT 2000
> How can I put a whole BLOCK of stuff in my head section via the
> application file? Stylesheet spec and language and doctype,
> copyright, webmaster, for example.
Palyne,
Here's a solution posted by Dave Watts on the CF-Talk list some time
ago:
---------
You might find it difficult to put complex strings in the TEXT
attribute; you'll have to escape quotes, and you won't be able to have
line breaks. You can work around this by creating a custom tag with a
start and end execution mode, which reads its contents and calls
CFHTMLHEAD:
<!--- CF_HTMLHEAD custom tag --->
<CFIF ThisTag.ExecutionMode IS "End">
<CFHTMLHEAD TEXT="#ThisTag.GeneratedContent#">
<CFSET ThisTag.GeneratedContent = "">
</CFIF>
<!--- end CF_HTMLHEAD custom tag --->
...
<!--- using CF_HTMLHEAD custom tag in application.cfm --->
<CF_HTMLHEAD>
<META NAME="foo" VALUE="bar">
<META NAME="foo2" VALUE="bar2">
...
</CF_HTMLHEAD>
---------
Other advice:
(1) use #CHR(34)# instead of double quote
(2) use two double quotes (from eVolt's own Jeff)
-David Shadovitz
More information about the thelist
mailing list