Layout Components 1.0 Documentation: Change the Head

Layout Components Information

Download from RIA Forge

Blog Entries

Change the Head

Using Layout Components it is easy to put content into the <head> of a document from any page.

Here are two examples of adding the following code to the <head> of a page:

<script language="JavaScript">alert('It worked!');</script>

Using cf_Template

<cf_Template
	title="Page Title"
	head_js="alert('It worked!');"
>
(some content here)

</cf_Template>
The cf_Template tag has several attributes to put content into the <head> of a page:

Using cf_layout

<cf_layout title="Page Title">
	<script language="JavaScript">alert('It worked!');</script>
<cf_layout>

(some content here)

<cf_layout>

Direct CFC Code

<cfoutput>#layout.head("Page Title")#</cfoutput>
	<script language="JavaScript">alert('It worked!');</script>
<cfoutput>#layout.body()#</cfoutput>

(some content here)

<cfoutput>#layout.end()#</cfoutput>