1 [% # This is a TT comment. -%]
3 [%- # Provide a title -%]
4 [% META title = 'Lists List' -%]
6 [% # Note That the '-' at the beginning or end of TT code -%]
7 [% # "chomps" the whitespace/newline at that end of the -%]
8 [% # output (use View Source in browser to see the effect) -%]
10 [% # Some basic HTML with a loop to display books -%]
21 [% # Display each list in a table row %]
22 [% FOREACH list_item IN list_items -%]
24 <td>[% list_item.id %]</td>
25 <td>[% list_item.product.name %]</td>
26 <td>[% list_item.product_quantity %]</td>
27 <td>[% list_item.product.weight %] kg</td>
28 <td>$[% list_item.product.cost %]</td>
32 <!-- XXX never use GET to delete data -->
33 <p> List #[% list_id%]. <a href="[%
34 c.uri_for(c.controller('ListItems').action_for('create'), [list_id]) %]">Add new list item?</a>