[% INCLUDE header %]
[% FOR item = objects %]
-<h2> [% item.name %]</h2>
+[% SET string = item.stringify_column %]
+<h2> [% item.$string %]</h2>
[% INCLUDE navbar %]
<TABLE class="view">
- <TR><TD class="field">Name</TD><TD> [% item.name %] </TD></TR>
+ <TR><TD class="field">[% classmetadata.colnames.$string %]</TD><TD> [% item.$string %] </TD></TR>
[%
FOR col = classmetadata.columns.list;
- NEXT IF col == "id" OR col == "name";
+ NEXT IF col == "id" OR col == string;
NEXT UNLESS item.$col;
%]
It gets the displayable form of a column's name from the hash returned
from the C<column_names> method:
-%#]
+#%]
<TR>
<TD class="field"> [% classmetadata.colnames.$col; %] </TD>
#One interesting macro used in this template is C<maybe_link_view>:
maybe_link_view(item.$col);
-%]
+%]
[%#