[Catalyst-commits] r10095 - in trunk/Catalyst-View-TT: . lib/Catalyst/Helper/View

bricas at dev.catalyst.perl.org bricas at dev.catalyst.perl.org
Tue May 12 14:48:29 GMT 2009


Author: bricas
Date: 2009-05-12 14:48:29 +0000 (Tue, 12 May 2009)
New Revision: 10095

Modified:
   trunk/Catalyst-View-TT/Changes
   trunk/Catalyst-View-TT/lib/Catalyst/Helper/View/TTSite.pm
Log:
Expand TTSite documentation (RT #33838)

Modified: trunk/Catalyst-View-TT/Changes
===================================================================
--- trunk/Catalyst-View-TT/Changes	2009-05-12 13:04:49 UTC (rev 10094)
+++ trunk/Catalyst-View-TT/Changes	2009-05-12 14:48:29 UTC (rev 10095)
@@ -6,6 +6,7 @@
           + Expand ::C:: to ::Controller:: and use $c->view('TT')
             where appropriate (bricas)
         - "use warnings" in Catalyst::View::TT and output from the TT helper
+        - Expand TTSite documentation (RT #33838)
 
 0.29    2009-02-20 14:43:00
         - Remove extra unwanted .gitignore from manifest

Modified: trunk/Catalyst-View-TT/lib/Catalyst/Helper/View/TTSite.pm
===================================================================
--- trunk/Catalyst-View-TT/lib/Catalyst/Helper/View/TTSite.pm	2009-05-12 13:04:49 UTC (rev 10094)
+++ trunk/Catalyst-View-TT/lib/Catalyst/Helper/View/TTSite.pm	2009-05-12 14:48:29 UTC (rev 10095)
@@ -75,22 +75,58 @@
 Catalyst::Helper::View::TT in that it additionally creates a simple
 set of templates to get you started with your web site presentation.
 
-It creates the templates in a F<templates> directory underneath your
+It creates the templates in F<root/> directory underneath your
 main project directory.  In here two further subdirectories are
-created: F<src> which contains the main page templates, and F<lib>
-containing a library of other templates components (header, footer,
+created: F<root/src> which contains the main page templates, and F<root/lib>
+containing a library of other template components (header, footer,
 etc.) that the page templates use.
 
 The view module that the helper creates is automatically configured
 to locate these templates.
 
-=head2 METHODS
+=head2 Default Rendering 
 
-=head3 mk_compclass
+To render a template the following process is applied:
 
+The configuration template F<root/lib/config/main> is rendered. This is
+controlled by the C<PRE_PROCESS> configuration variable set in the controller
+generated by Catalyst::Helper::View::TTsite. Additionally, templates referenced by
+the C<PROCESS> directive will then be rendered. By default the following additional
+templates are set: F<root/lib/config/col>,
+which defines color names and RGB their RGB values and F</root/lib/config/url>,
+which defines site wide variables available to templates.
+
+Next, the template defined by the C<WRAPPER> config variable is called. The default
+wrapper template is located in F<root/lib/site/wrapper>. The wrapper template
+passes files with C<.css/.js/.txt> extensions through as text OR processes
+the templates defined after the C<WRAPPER> directive: C<site/html> and C<site/layout>.
+
+Based on the default value of the C<WRAPPER> directive in F<root/lib/site/wrapper>,
+the following templates are processed in order:
+
+=over 4
+
+=item * F<root/src/your_template.tt2>
+
+=item * F<root/lib/site/footer>
+
+=item * F<root/lib/site/header>
+
+=item * F<root/lib/site/layout>
+
+=item * F<root/lib/site/html>
+
+=back
+
+Finally, the rendered content is returned to the bowser.
+
+=head1 METHODS
+
+=head2 mk_compclass
+
 Generates the component class.
 
-=head3 mk_templates
+=head2 mk_templates
 
 Generates the templates.
 




More information about the Catalyst-commits mailing list