CatalystX::CRUD::YUI::View - base View class
# see catalyst::View::TT
CatalystX::CRUD::YUI::View is a subclass of Catalyst::View::TT that extends the base class in a few minor ways. See METHODS for details.
Configuration is the same as with Catalyst::View::TT. Read those docs.
The default config here is:
__PACKAGE__->config( TEMPLATE_EXTENSION => '.tt', PRE_PROCESS => 'crud/tt_config.tt', WRAPPER => 'crud/wrapper.tt', );
Only new or overridden method are documented here.
Overrides base new() method. Sets INCLUDE_PATH to the base CatalystX::CRUD::YUI::TT .tt files plus your local app root. This means you can override the default template behaviour by putting a .tt file with the same name in your root template dir.
root
For example, to customize your wrapper.tt file, just copy the default one from the CatalystX/CRUD/YUI/TT/crud/wrapper.tt in @INC and put it in root/crud/wrapper.tt. Likewise, you can set up a global config file by creating a root/crud/tt_config.tt file and putting your MACROs and other TT stuff in there.
wrapper.tt
CatalystX/CRUD/YUI/TT/crud/wrapper.tt
root/crud/wrapper.tt
root/crud/tt_config.tt
Overrides base method to add some other default variables.
The yui variable is a CatalystX::CRUD::YUI object.
yui
The page variable is a hashref with members js and css. It is used by crud/page_head_maker.tt to ease the addition of per-request .js and .css files. Stuff the base file name into the array in each .tt file to get those files included in the page header.
page
Example:
[% page.css.push('foo') %] # html <head> section will contain: # <link type="stylesheet" href="[% static_url %]/css/foo.css" />
The static_url variable defaults to $c->uri_for('/static'). You can override that in $c->config() by setting a 'static_url' value to whatever base URL you wish. Ideal for serving your static content from different URL than your dynamic content.
static_url
Overrides base method to test if template is set in stash, and if it is, tests that it exists before calling next::method(). If it does not exist, will change the template value in stash to be crud/file.tt> in order to call the default crud template.
template
crud/file.tt
This path mangling allows you to avoid creating .tt files for all your actions unless you want to override the default template's behaviour.
Overrides base method to coerce output into UTF-8.
Peter Karman, <karman@cpan.org>
<karman@cpan.org>
Please report any bugs or feature requests to bug-catalystx-crud-yui@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-catalystx-crud-yui@rt.cpan.org
The Minnesota Supercomputing Institute http://www.msi.umn.edu/ sponsored the development of this software.
http://www.msi.umn.edu/
Copyright 2008 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install CatalystX::CRUD::YUI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::CRUD::YUI
CPAN shell
perl -MCPAN -e shell install CatalystX::CRUD::YUI
For more information on module installation, please visit the detailed CPAN module installation guide.