panels_customerror.module in Panels Custom Error 7
File
panels_customerror.module
View source
<?php
include_once 'panels_customerror.features.inc';
function panels_customerror_block_info() {
$blocks['403'] = array(
'info' => t('Access Denied Message'),
'cache' => DRUPAL_CACHE_PER_PAGE,
);
$blocks['404'] = array(
'info' => t('Page not found Message'),
'cache' => DRUPAL_CACHE_PER_PAGE,
);
return $blocks;
}
function panels_customerror_block_view($delta = '') {
$block = array();
if ($delta == '403') {
return array(
'content' => t('You are not authorized to access this page.'),
);
}
elseif ($delta == '404') {
return array(
'content' => t('The requested page "@path" could not be found.', array(
'@path' => request_uri(),
)),
);
}
return $block;
}