Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views Minimum Condition

Security covered Under active development 24 sites

Part of the Views ecosystem · 286 projects

Views Minimum provides a condition that checks if a specific View has any results. This allows you to hide or show parts of a page based on whether a View is empty, has results, or has at least a minimum number of results. It's particularly useful for dynamic layouts in tools like Layout Builder and Acquia Site Studio.

Have you ever had to put some Views displays on a page but wanted to hide one or more areas if the View was empty? Is "hide if no data" not powerful enough for some requirements with Acquia Site Studio or do you want to adapt sections of layout with Layout Builder? Sometimes simply 'hiding' a View in its settings is not enough if you have a lot of components or layout displays built around it that are dependent on that View.

Views Minimum is a condition that will evaluate a selected view and its selected display for results and return true or false if the View is empty or not (has at least 1 result). This will make it possible to not only hide the area where the View would be, but also be capable of hiding (or showing) other areas of a page based on this condition.

If your View has other Views attached in its 'No Results behavior' - for instance, showing another View if the current one is empty, this module will check for that too.

You can also set a minimum result count as part of the evaluation (for example, if you only want to display a part of the page if the View had more than X results). Using the Context module you can build as many as you need using this condition plugin and create several custom contexts.

For modules or page building tools like Layout Builder or Acquia Site Studio or similar that can leverage conditions and context visibility, this may just be the tool you are looking for.

Additionally, this module pairs really well with Site Studio Views Element.

Drupal 8–11

Ask your assistant about Views Minimum Condition

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Apr 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
1.0.4 Stable 8–11 Sep 24, 2024
1.0.3 Stable 8–11 May 10, 2024
1.0.2 Stable 8–10 Apr 10, 2023