O'Reilly logo

Drupal 8 Blueprints by Alex Burrows

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exposed filters

Inside views, we can have two approaches for filter; first are filters predefined, so by default, we have Publishing status: Yes, which is set to show only published content.

We then have our exposed filters, which allows the filter we set to be shown to the user; it will create a form and by default, it appears above the view content. If you want to, you can move the exposed filters below your content, or you can move them to another region entirely if you're feeling adventurous!

Getting back to creating our exposed filter, we need to add our category type; so, clicking on Add next to the Filters title will make a modal show up, which is like the modals we saw earlier.

Start by searching for category inside our Search text ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required