| CatalystX-CMS documentation | view source | Contained in the CatalystX-CMS distribution. |
CatalystX::CMS - drop-in content management system
package MyApp;
# ...
MyApp->config(
cms => {
model_name => 'CMS',
view_name => 'CMS',
actionclass_per_action => 0,
use_editor => 1,
use_layout => 1,
editor => {
height => '300',
width => '550',
},
default_type => 'html',
default_flavour => 'default',
lock_period => 3600,
root => {
r => [
MyApp->path_to('root')
],
rw => [
'/path/to/svn/workdir'
]
}
}
);
MyApp->setup;
# elsewhere, in a controller
package MyApp::Controller::Foo;
use strict;
use base qw( CatalystX::CMS::Controller );
sub bar : Local {
# ...
}
1;
CatalystX::CMS is a drop-in content management system that allows you to manage your Catalyst app templates via a web-based editor.
Only new or overridden method are documented here.
Calls do_action().
Calls create().
Calls the method named in the stash() in c under the key cms_mode. cms_mode is typically set by CatalystX::CMS::Action->execute().
Calls delete().
TODO
Returns a username to associate with the lock on a file.
If c has a user method (as if using Catalyst::Plugin::Authentication),
calls the user->id method chain.
Otherwise, returns anonymous.
Available as a cms_mode method.
Display svn history of cmspage.
Available as a cms_mode method.
Display svn diff of cmspage.
If the rev request param is present, the difference between
that value and the previous revision is used.
Available as a cms_mode method.
Display svn blame of cmspage.
Available only via HTTP POST.
Calls create() method on cmspage passing get_user() for lock owner.
Sets redirect uri for edit().
Available as a cms_mode method.
Verifies lock on cmspage, extending it if necessary, and displays the cms editor template.
Called by PUT(). Calls cms_mode like GET() does, but checks lock on cmspage first.
do_action() is typically called for save()ing a cmspage.
Available as a cms_mode method.
Reverts any local changes to cmspage and unlocks the page.
If cmspage has never been committed to the svn repository, the file will be removed.
Called by save() to verify that cmspage has correct TT syntax.
If strict_html mode is set and the type() of cmspage is html
XML::LibXML is used to verify that cmspage parses correctly.
Available as a cms_mode method.
Typically called by do_action() via PUT().
Available as a cms_mode method.
Like save() but with no commit() and preserves lock
Available as a cms_mode method.
Called by DELETE(). Removes lock on cmspage and deletes the file from the local workspace and from the svn repository. See also cancel().
Peter Karman, <karman@cpan.org>
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.
The Minnesota Supercomputing Institute http://www.msi.umn.edu/
sponsored the development of this software.
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.
| CatalystX-CMS documentation | view source | Contained in the CatalystX-CMS distribution. |