0

I'm following the docs here to create a custom filter.

The first sentence says:

Go to Custom Filters (/admin/settings/customfilter) (6.x & 7.x)

However, that link just redirects me to the overall admin menu page (looks the same as if I go to /admin). What am I doing wrong?

2 Answers 2

1

Did you install the Custom Filters module? (https://www.drupal.org/project/customfilter)

Works fine for me after I install the module.

0

The correct path for Drupal 7 (there isn't any difference between version 7.x-1 or 7.x-2 of the module) is admin/config/content/customfilter; that is what the module uses as path for its setting pages, in hook_menu().

  $access = array('administer customfilter');
  $items = array();

  $items['admin/config/content/customfilter'] = array(
    'title' => 'Custom filters',
    'description' => 'Allow the users to define custom filters.',
    'page callback' => 'customfilter_settings',
    'access arguments' => $access,
  );

  $items['admin/config/content/customfilter/list'] = array(
    'title' => 'Filters',
    'access arguments' => $access,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
  );

  $items['admin/config/content/customfilter/add'] = array(
    'title' => 'Add filter',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('customfilter_filter_add'),
    'access arguments' => $access,
    'type' => MENU_LOCAL_TASK,
  );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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