Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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