diff --git a/src/Plugin/views/area/ViewsXPosedFilters.php b/src/Plugin/views/area/ViewsXPosedFilters.php index 20e2eb1..19d8b88 100644 --- a/src/Plugin/views/area/ViewsXPosedFilters.php +++ b/src/Plugin/views/area/ViewsXPosedFilters.php @@ -105,6 +105,7 @@ public function render($empty = FALSE) { // Get the value(s) of the filters. $build_count = 0; + $exposed_count = 0; foreach ($this->exposedInput as $exposed_name => $exposed_value) { // Ignore any query string operators that have no input value. if (empty($this->exposedInput[$exposed_name])) { @@ -116,6 +117,9 @@ public function render($empty = FALSE) { continue; } + // Keep track of how many exposed filters there are. + $exposed_count++; + // Ignore any exposed filters that are not listed by the user. if (!empty($exposed_filters) && array_search($exposed_name, $exposed_filters) === FALSE) { continue; @@ -210,7 +214,7 @@ public function render($empty = FALSE) { } // Return plain URL if there is only 1 filter. - if (count($filters) == 1) { + if ($exposed_count == 1 && count($filters) == 1) { $markup .= '