Skip to content

Instantly share code, notes, and snippets.

@chrisdpeters
Created February 23, 2012 23:20
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 chrisdpeters/1895660 to your computer and use it in GitHub Desktop.
Save chrisdpeters/1895660 to your computer and use it in GitHub Desktop.
Improving the Tutorial: Object- and Query-Driven Partials in CFWheels
<cfoutput>
<tr>
<td>#arguments.name#</td>
<td>#arguments.email#</td>
<td>#linkTo(text="Edit", action="edit", key=users.id, title="Edit #arguments.name#")#</td>
<td>#linkTo(text="Delete", action="delete", key=users.id, title="Delete #arguments.name#", confirm="Are you sure that you want to delete #arguments.name#?")#</td>
</tr>
</cfoutput>
<table>
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th colspan="2"></th>
</tr>
</thead>
<tbody>
<cfloop query="users">
<tr>
<td>#users.name#</td>
<td>#users.email#</td>
<td>#linkTo(text="Edit", action="edit", key=users.id, title="Edit #users.name#")#</td>
<td>#linkTo(text="Delete", action="delete", key=users.id, title="Delete #users.name#", confirm="Are you sure that you want to delete #users.name#?")#</td>
</tr>
</cfloop>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th colspan="2"></th>
</tr>
</thead>
<tbody>
#includePartial(users)#
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment