|
|
|||||||||||||||||||
CFM Tutorial
Part I - Introduction
Part II - Getting Up
Part III - Getting started
Part IV - References |
Cold Fusion Tag: <CFOUTPUT></CFOUTPUT> Description
Syntax <CFOUTPUT QUERY="Query Name" MAXROWS="Maximum Rows" STARTROW="Start Row" GROUP="Group Column"> Code </CFOUTPUT>
Example: Any time you use variables or fields with your template, you must enclose them with
<CFOUTPUT> Hi #name#, thanks for dropping by again.<p> You have now visited us #NumberFormat(visits)# times since your first visit on #dateFormat(first_visit)#. </CFOUTPUT>The next example use <CFOUTPUT> to dislay the results of a query in an unordered list. <UL> <CFOUTPUT QUERY="employees"> <li> #LastName#, #FirstName# - Ext: #PhoneExtension# </li> </CFOUTPUT> </UL>To group output results you can use the GROUP attribute as shown in the following example which lists employees within departments. <UL> <CFOUTPUT QUERY="Employee" GROUP="Department"> <li><b>#Department#</b></li> <ul> <CFOUTPUT> <li>#LastName#,#FirstName# - Ext: #PhoneExtension#</li> </CFOUTPUT> </ul> </li> </CFOUTPUT> </UL> |
References(1) the Cold Fusion Web Application Construction Kit, Second Edition.
|
|||||||||||||||||
|
|||||||||||||||||||