Skip Menu |

This queue is for tickets about the Catalyst-View-TT CPAN distribution.

Report information
The Basics
Id: 33838
Status: resolved
Priority: 0/
Queue: Catalyst-View-TT

People
Owner: Nobody in particular
Requestors: matthew_richardson [...] mentor.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: updated documentation
I have added information on the files created by the Helper and how the templates are rendered. This will save newbies like me time in figuring out where to place new templates and static content like css and JavaScript links. Thanks, Matt
Subject: TTSite.diff
--- TTSite.pm 2008-01-12 10:09:02.000000000 -0800 +++ TTSite.pm.MR 2008-03-05 14:05:22.380814000 -0800 @@ -75,15 +75,40 @@ 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. +=head3 Default Rendering + +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 left to right: + + +F<root/src/your_template.tt2> E<gt> F<root/lib/site/footer> E<gt> F<root/lib/site/header> E<gt> F</root/lib/site/layout> E<gt> F<root/lib/site/html> + +Finally, the rendered content is returned to the bowser. + =head2 METHODS =head3 mk_compclass
I've applied your patch, with some minor modifications, as svn revision 10095. Thank you.