Skip to content

Instantly share code, notes, and snippets.

@junnama
Created January 12, 2016 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junnama/52fed19667dd83a585ae to your computer and use it in GitHub Desktop.
Save junnama/52fed19667dd83a585ae to your computer and use it in GitHub Desktop.
Not overwrite Main Index by Page.
callbacks:
cms_save_filter.page: >
sub {
my ( $cb, $app ) = @_;
if ( ( $app->param( 'category_ids' ) eq '-1' ) &&
( $app->param( 'basename' ) eq 'index' ) ) {
return $cb->error( $app->translate( 'File [_1] exists; could not overwrite.',
$app->translate( 'Main Index' ) ) );
}
1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment