Peter Karman > CatalystX-CRUD-YUI-0.027 > CatalystX::CRUD::YUI::View

Download:
CatalystX-CRUD-YUI-0.027.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.027   Source   Latest Release: CatalystX-CRUD-YUI-0.031

NAME ^

CatalystX::CRUD::YUI::View - base View class

SYNOPSIS ^

 # see catalyst::View::TT

DESCRIPTION ^

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 ^

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',
 );

METHODS ^

Only new or overridden method are documented here.

new

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.

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.

template_vars

Overrides base method to add some other default variables.

process

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.

This path mangling allows you to avoid creating .tt files for all your actions unless you want to override the default template's behaviour.

AUTHOR ^

Peter Karman, <karman@cpan.org>

BUGS ^

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.

ACKNOWLEDGEMENTS ^

The Minnesota Supercomputing Institute http://www.msi.umn.edu/ sponsored the development of this software.

COPYRIGHT & LICENSE ^

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.

syntax highlighting: