Conditional Plugin (Visibility) by Query Parameters

Extends conditional plugin API to add URI Query Parameters to control the content visibility. Drupal core conditional plugin API provides the ability to control the visibility of content (block) using paths, etc. This module adds new conditional plugin to allow administrators to control the visibility of content using url query parameter.

This plugin can be used to show or hide blocks, contents etc based on query parameter. It supports query parameter with array ex: ?visibility[]=show

List of features using condition plugins,

  • Block
  • Rules
  • Page manager
  • etc

Example usage:
1) Display blocks if query parameter has "visibility=show" ( http:://www.example.com/?visibility=show )
2) Hide all blocks (Using "Negate the condition" checkbox) if query parameter has "app=true" ( http:://www.example.com/?app=true)

Conditional Plugin block query

Supporting organizations:
AttachmentSize
Block Visiblity 82.71 KB
Page Manager 68.2 KB

Project information

Releases

8.x-1.5 Stable release covered by the Drupal Security Team released 19 February 2025
Works with Drupal: ^8 || ^9 || ^10 || ^11

Declare Drupal 11 compatibility

Install:

Development version: 8.x-1.x-dev updated 19 Feb 2025 at 00:58 UTC