1Catalyst::Helper::View:U:sTeTrSiCtoen(t3r)ibuted Perl DoCcautmaelnytsatt:i:oHnelper::View::TTSite(3)
2
3
4
6 Catalyst::Helper::View::TTSite - Helper for TT view which builds a
7 skeleton web site
8
10 # use the helper to create the view module and templates
11
12 $ script/myapp_create.pl view TT TTSite
13
14 # add something like the following to your main application module
15
16 sub message : Global {
17 my ( $self, $c ) = @_;
18 $c->stash->{template} = 'message.tt2';
19 $c->stash->{message} ⎪⎪= $c->req->param('message') ⎪⎪ 'No message';
20 }
21
22 sub default : Private {
23 my ( $self, $c ) = @_;
24 $c->stash->{template} = 'welcome.tt2';
25 }
26
27 sub end : Private {
28 my ( $self, $c ) = @_;
29 $c->forward('MyApp::V::TT');
30 }
31
33 This helper module creates a TT View module. It goes further than Cat‐
34 alyst::Helper::View::TT in that it additionally creates a simple set of
35 templates to get you started with your web site presentation.
36
37 It creates the templates in a templates directory underneath your main
38 project directory. In here two further subdirectories are created: src
39 which contains the main page templates, and lib containing a library of
40 other templates components (header, footer, etc.) that the page tem‐
41 plates use.
42
43 The view module that the helper creates is automatically configured to
44 locate these templates.
45
46 METHODS
47
48 mk_compclass
49
50 Generates the component class.
51
52 mk_templates
53
54 Generates the templates.
55
57 Catalyst, Catalyst::View::TT, Catalyst::Helper, Cata‐
58 lyst::Helper::View::TT
59
61 Andy Wardley <abw@cpan.org>
62
64 This library is free software . You can redistribute it and/or modify
65 it under the same terms as perl itself.
66
68 [% class %] - Catalyst TTSite View
69
71 See "[% app %]"
72
74 Catalyst TTSite View.
75
77 [% author %]
78
80 This library is free software, you can redistribute it and/or modify it
81 under the same terms as Perl itself.
82
83
84
85perl v5.8.8 2008-01-11 Catalyst::Helper::View::TTSite(3)