I am setting the links as a block in the left panel with the following code.
function notification_block($op = 'list', $delta = 0, $edit = array()) {
if ($op == 'list') {
$blocks[0] = array(
'info' => t('Notification Management'),
'weight' => 0,
'status' => 1,
'region' => 'left',
'visibility' => 1,
'pages' => 'notification'
);
return $blocks;
}
else if ($op == 'save' && $delta == 0) {
variable_set('notification_block_items', $edit['items']);
}
else if ($op == 'view') {
switch ($delta) {
case 0:
// Your module will need to define this function to render the block.
$block = array(
'subject' => t('Notification Management'),
'content' => notification_block_conent(),
);
break;
}
return $block;
}
}
function notification_block_content() {
$ret = '<a href="'.$base_url.'/notification/addTemplate">Add new email template</a>';
$ret .= '<br/><a href="'.$base_url.'/notification">Manage Email Notfication</a>';
return $ret;
}
``
Unfortunately, this block is appearing in all the pages. I need to display this block on the notification module only. How can I achieve this?