I am setting the links as a block in the left panel as follows :

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(),
    return $block;

and the content :

function notification_block_conent(){ 
    //create menu links      
     $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;

But unfortunatelly this block is appearing in all pages . I need to display this block on the notification module only. Any idea ?


Go to block configuration page scroll down to Page specific visibility settings
There are the following options Show block on specific pages:

  • Show on every page except the listed pages.
  • Show on only the listed pages.
  • Show if the following PHP code returns TRUE (PHP-mode, experts only).

if you are using last option from the above options then please refer the solution from this reference

  • you are most welcome :) – rfegade Aug 17 '15 at 17:40

In the block settings you can configure pages, where this block should appears. Is it solved your problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.