Skip to content

Instantly share code, notes, and snippets.

@adamcameron
Created August 2, 2012 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamcameron/3241361 to your computer and use it in GitHub Desktop.
Save adamcameron/3241361 to your computer and use it in GitHub Desktop.
A demonstration of looping custom tags in ColdFusion. Part 2: data.cfm (http://bit.ly/T5ikmR)
<!--- data.cfm --->
<cfscript>
q = queryNew("");
queryAddColumn(q, "id", [1,2,3,4]);
queryAddColumn(q, "English", ["one","two","three","four"]);
queryAddColumn(q, "Maori", ["tahi","rua","toru","wha"]);
a = [
[1,"one","tahi"],
[2,"two","rua"],
[3,"three","toru"],
[4,"four","wha"]
];
</cfscript>
<cfxml variable="x">
<numbers>
<number id="1" english="one" maori="tahi" />
<number id="2" english="two" maori="rua" />
<number id="3" english="three" maori="toru" />
<number id="4" english="four" maori="wha" />
</numbers>
</cfxml>
<cfinclude template="test.cfm">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment