With the new Notifications plugin a notification can be placed anywhere via page manager. This will allow removing content types that the default notifications should be hidden on. This is probably a stop-gap solution but for now it works.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scottalan created an issue. See original summary.

scottalan’s picture

An example would be:

/**
 * Implements hook_is_notification_type_alter().
 *
 * @see oa_notifications_form_node_form_alter().
 */
function MY_MODULE_is_notification_type_alter(&$types) {
  // List of content types we want to remove the default notifications form.
  $notification_types = array('basic_page');
  // We only want to do this on content types that have added the
  // oa_notifications widget to the node edit form otherwise there will be
  // no notifications field on the form. Without this there would be two
  // notification forms on the edit form.
  foreach ($notification_types as $notification_type) {
    unset($types[$notification_type]);
  }
}

Patch included.

mpotter’s picture

Status: Active » Fixed

Committed to oa_notifications 6d87bb2.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.