Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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