NAME

CatalystX::CMS::Controller - controller base class

SYNOPSIS

 package MyApp::Controller::Foo;
 use base (
    'CatalystX::CMS::Controller',    # MUST come first
    'Other::Controller::Base::Class'
 );
 
 sub bar : Local {
     
 }
 
 1;
 
 # if /foo/bar?cxcms=edit then can edit foo/bar.tt
 

DESCRIPTION

CatalystX::CMS::Controller is a Catalyst::Controller base class for use with CatalystX::CMS.

METHODS

Only new or overridden method are documented here.

new

Merges config with app config and then calls next::method().

create_action( args )

Overrides base method to use set default Action class as CatalystX::CMS::Action instead of Catalyst::Action.

cms_template_for( c, args )

Returns a CatalystX::CMS::Page object to be acted upon. The default assumes the same logic as Catalyst::View::TT but you may override to implement different naming scheme or logic.

args is an array. args is what is passed to the CatalystX::CMS::Action execute() method. See Catalyst::Action execute() documentation for details.

If present, args will be joined with a / and passed to the CMS model.

If no args are present, then $c->action->reverse is used.

If the special request param cxcms-url is present in $c->req->params, then that value will override all others and will be used as the file argument to the CMS model.

cms_may_edit( c )

Default returns true. Override to implement authorization.

cms_list

Default local URL method for browsing the pages available in the CMS. Uses the cms/svn/list.tt template by default.

Override this method in your local controller to customize the browsing of your CMS.

AUTHOR

Peter Karman, <karman@cpan.org>

BUGS

Please report any bugs or feature requests to bug-catalystx-cms@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.