5 Drinker C<view> template displays drinker and from to drink beer.
12 [% view_item(object); %]
14 [%# Form to drink a pint. We made sure to only make inputs for pint. could do it
16 USE this = Class(classmetadata.name);
17 classmetadata.cgi = this.to_field(pints);
21 <form action="[% base _ "/" _ request.table _ "/" _ request.action _ "/" _ object.id %]" method="post">
23 <legend> Drink a beer </legend>
26 INCLUDE display_inputs classmetadata.columns=['pints'] ;%]
29 <input type='submit'name='submit' value='Hellyeah!'\>
39 The C<view> template also displays a list of other objects related to the first
40 one via C<has_many> style relationships; this is done by calling the
41 C<related_accessors> method - see L<Model/related_accessors> - to return
42 a list of has-many accessors. Next it calls each of those accessors, and
43 displays the results in a table.
46 <br /><a href="[%base%]/[%object.table%]/list">Back to listing</a>
47 [% view_related(object); %]
50 button(object, "edit");
51 button(object, "delete");