Created
January 12, 2016 04:12
-
-
Save junnama/52fed19667dd83a585ae to your computer and use it in GitHub Desktop.
Not overwrite Main Index by Page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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