Catalyst::Helper::View::TT::Bootstrap::YUI - Generate TT templates using YUI
Helper for TT view. Creates the MyAppView/TT.pm file and a template directory structure under MyApp/root containing templates, macros, and links to the hosted version of the YUI reset-fonts-grids.css file.
MyAppView/TT.pm
reset-fonts-grids.css
Use the helper to create the view module and templates:
$ script/myapp_create.pl view TT TT::Bootstrap::YUI
The stash key for configuring everything is $c->stash->{page} with defaults in MyApp/root/site/shared/base.tt.
$c->stash->{page}
MyApp/root/site/shared/base.tt
Add something like the following to the page templates for your application
[%~ page.layout = '2columns'; # use a 2 column layout (default is 'default') page.header = 'my_custom'; # will load root/site/header/my_custom.tt page.footer = 'none'; # don't display a footer # adds these <link rel="stylsheet"...> tags to the <head> page.head.stylesheets.push('foo.css','bar.css'); # adds these <script> tags to the <head> page.head.scripts.push('foo.js','bar.js'); # adds these <script> tags to the bottom of the <body> -- usually preferable page.body.scripts.push('baz.js','poop.js'); # adds these classes to the <body> tag page.body.classes.push('foo','bar'); ~%] ...your content here...
This helper module creates a Catalyst::View::TT class in your application. It also creates a set of templates, macros, and a stylesheet to let you focus on the content of your apps pages sooner with less copy and pasting.
It also provides a mechanism for adding dynamic filters, for doing things like date formatting.
If you already have a TT view in your application, make sure to include the other directives that are created by the helper. Typically, this file is simply MyApp/lib/MyApp/View/TT.pm.new if a file exists with the same name.
MyApp/lib/MyApp/View/TT.pm.new
See Catalyst::Helper::View::TT::Bootstrap::YUI::Manual for more details on available variables and macros, and how to work with the layouts.
Generates the component class.
Generates the templates.
Catalyst, Catalyst::View::TT, Catalyst::Helper, Catalyst::Helper::View::TT
Jay Shirley <jshirley@cpan.org>
Lucas Smith <lsmith@lucassmith.name>
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
[% class %] - Catalyst TT::Bootstrap::YUI View
See "[% app %]"
Catalyst TT::Bootstrap::YUI View.
[% author %]
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Helper::View::TT::Bootstrap::YUI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Helper::View::TT::Bootstrap::YUI
CPAN shell
perl -MCPAN -e shell install Catalyst::Helper::View::TT::Bootstrap::YUI
For more information on module installation, please visit the detailed CPAN module installation guide.