[dancer-users] Template Toolkit Sort Hash
Richard Reina
gatorreina at gmail.com
Fri Sep 25 19:40:39 BST 2015
I display a hash reference in a template. It works well but is there a
way I can sort it by SNAME instead of ID?
<ul class="list-group fancy-list-items"> <!-- <ul class="list-group
checked-list-box"> -->
<table style="width:100%">
<% FOREACH ID IN Pats.keys.sort %>
<tr class="list-group-item">
<td width="70"><% Pats.$ID.SNAME %></td>
<td width="75"><% Pats.$ID.ANAME %></td>
<td width="35"><% Pats.$ID.SSN %></td>
<td width="35"><% Pats.$ID.YR %></td>
<td width="250"><% Pats.$ID.CHNAME %></td>
<td width="550"><% Pats.$ID.DESCRIP %></td>
<% END %>
</tr>
</ul>
</table>
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150925/0697078d/attachment.html>
More information about the dancer-users
mailing list