Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

Extends the condition plugin API to add included and excluded paths to control
content visibility.

Show and hide content such as blocks on specific paths

The condition plugin builds on top of the Drupal Core Request Path plugin, also known as 'Pages' visibility of Blocks. The latter allows only whitelisted paths OR blacklisted paths to control content visibility while this plugin allows both whitelisted AND blacklisted paths and subpaths.

The module works the same as the Core 'Request Path' (Pages) plugin but allows using "!" as a path prefix to exclude a path. Wildcards can be used in the middle or end of a path.

Example 1:
Make a block visible on the /user page and all its subpages, except for the 'messages' subpage. The block will be visible on subpages of 'messages' (e.g. /user/*/messages/578):

  • /user
  • /user/*
  • !/user/*/messages

Example 2:
Display a block on all pages of the website, except on product (sub)pages but allow the block on product review pages:

  • *
  • !/products/*
  • /products/*/reviews

More examples can be found in the readme of the project.

This condition plugin gives you full control on which paths content should and should not be displayed.

Similar modules:

  • Block Exclude Pages: Does the same thing but without using Drupal's condition plugins and is limited to Block visibility only.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
3.0.1 Stable Oct 21, 2024