1

I have a view that will be a grid of a dozen content types. I would like to have a tag-like button or text link above the view of content to allow the user to toggle / filter between what content type they wish to see. I know that exposed filters allows you to use a dropdown or auto-complete, but is this possible with using tags as buttons?

2 Answers 2

2

It sounds like you want to have something like this, what is provided by the Facet API module (Drupal 7) or Facets For Drupal 8.

enter image description here Image copied from: https://www.webwash.net/drupal/tutorials/intro-search-api-part-2-faceted-search (explanation of Facet API combined with Search API). It should however also work with the Drupal core search system. (I only used it with Search API)

The Facet API module allows site builders to easily create and manage faceted search interfaces. In addition to the UI components that come out of the box, themers and module developers can build their own widgets that can optionally be contributed back to Drupal.org. Facet API works with the core Search, Search API, and Apache Solr Search Integration modules (including Acquia Search) meaning that code and configuration can be reused as-is with the most popular search solutions available to Drupal. Refer to the documentation for more details.

Each facet will be exposed as a block, that you can place anywhere in your site from the block administration page.

2
0

If you want an easier option than setting up the Search API, you could just use Views Better Exposed Filters. https://www.drupal.org/project/better_exposed_filters

2
  • The facet API module claims to support core search. So setting up search API is not required. Commented Jun 16, 2016 at 17:29
  • @Neograph734, you're right but currently its still under development for supporting the core search in D8. drupal.org/node/2877989#comment-12137409 Commented Jun 22, 2017 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.