Add option to hide the exposed filter

Created on 14 December 2021, almost 3 years ago
Updated 21 April 2023, over 1 year ago

UPDATE: It sounds like this is actually a bug - the exposed filter is intended to always be hidden. So I'm updating the title accordingly. The original feature request is below, but can be ignored:

Problem/Motivation

The use-case that led us to this module is giving content editors the ability to place a Views block which is filtered to a particular taxonomy term, chosen at the time of block placement. So for example, letting a content editor place a listing of all videos tagged as "cats". We don't want the end-user to see the exposed filter, we just want the content editor to see it. So given the example, the end-user would just see a list of videos tagged as "cats", without any ability to change the filter.

This module gets us most of the way there, but we still need to hide the exposed filter so that the end-user can't change it. We are using CSS ("display:none") to do this. This works fine but is a little hacky and I thought maybe there ought to be a UI solution, if this is a common-enough use case.

Proposed resolution

I don't know of a good resolution - just throwing it out there in case it would be a useful feature.

Remaining tasks

* Decide if this is a common-enough use case
* Decide on the best interface
* Develop/review

User interface changes

TBD

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Needs review

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States brockfanning

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States chrisgross

    The latest patch does seem to work as far as hiding the filters are concerned, but I question the purpose of choosing which filters to hide when placing the block. In our use case, the people placing blocks are content editors, and they don't really have any concept of what an exposed filter is or whether they should hide them. Adding this option just serves to confuse them, doubly so since the filters are all displayed by default and have to be turned off.

    My understanding of the purpose of this module is simply to let content creators decide how to filter the content that appears in the blocks they place, which is what they are doing in the block settings. Letting them then choose not to hide said filters from the user-facing page sort of defeats the purpose of setting the value in the block config, does it not?

    Perhaps if there truly is a use case for this, it should perhaps be configurable somewhere else?

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    For people who want *all* the exposed filters to be hidden from the end user display, a simple workaround would be to tick "Exposed form in block" in the Views UI.

  • πŸ‡ΊπŸ‡ΈUnited States brockfanning

    I thought it had been established in #2 that this was a bug - not a feature. I may have confused things because I apparently tried out this module right when the bug started, and so I thought that the bug was intentional. We've ended up using a rather convoluted custom code approach (not using this module), but I would still be very interested in seeing this module work the way it was intended.

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Agreed with everything in #18. This is a bug, given the intended design indicated above. It would be great to have this fixed instead of convoluted custom code or limited workarounds (#17).

Production build 0.71.5 2024