do not include .git directory
[catagits/Reaction.git] / old / Manual / Cookbook.pod
1 =head1 NAME
2
3 Reaction::Manual::Cookbook - Miscellaneous recipes
4
5 =head1 RECIPES
6
7 These should include some hopefully useful tips and tricks!
8
9 =head2 Display
10
11 These would typically go in your /root directory along with your other
12 templates.
13
14 =head3 Alternating listview row styles with CSS
15
16 Filename: listview
17
18   [%
19   
20   PROCESS base/listview;
21   
22   row_block = 'listview_row_fancy';
23   
24   BLOCK listview_row_fancy;
25   
26     IF loop.count % 2 == 1;
27       attrs.class = 'dark';
28     ELSE;
29       attrs.class = 'light';
30     END;
31   
32     INCLUDE listview_row;
33   
34   END;
35   
36   %]
37
38 =head3 Displaying heading on action forms
39
40 Filename: form_base
41
42   [%
43   
44   PROCESS base/form_base;
45   
46   main_block = 'form_base_control_fancy';
47   
48   BLOCK form_base_control_fancy;
49   
50     action_class = self.action.meta.name.split('::').pop;
51     '<h3>'; action_class.split('(?=[A-Z])').join(' '); '</h3>';
52     INCLUDE form_base_control;
53   
54   END;
55   
56   %]
57
58 =head2 Controllers
59
60 Things
61
62 =head2 Models
63
64 Stuff
65
66 =head1 AUTHORS
67
68 See L<Reaction::Class> for authors.
69
70 =head1 LICENSE
71
72 See L<Reaction::Class> for the license.
73
74 =cut