Samuli Natri
Dec. 30, 2015
Updated: Sep. 28, 2016
By Samuli NatriDec. 30, 2015
(Updated: Sep. 28, 2016)

Views #6 : Exposed Filters, Caching, Other Settings (Drupal 8 Tutorial #9) (Article + Video)

How to expose filters to visitors so they can change them and overview of the 'Other' settings, like caching.

Table of Contents

Exposed Filters

  • Edit the Content: Publishing status filter in the FILTER CRITERIA section and check the following:

  • Click Apply
  • Unpublish some items and you can see the filter in action:

Exposed Filters can also be blocks:

  • Go to Structure > Block layout and click Place block for the Sidebar first section:

Now the exposed filter is showing in the sidebar:

Check out Better Exposed Filters: for extra options.

Other Settings

Here are some notes for the OTHER settings:

  • Sometimes it's useful to change the Machine Name to something more descriptive if you are planning to use the view display in some other place.
  • Enable Ajax to use options like pagers, sorting and exposed filters without page refresh.
  • Contextual link is the little pen picture you see when you hover over the view.
  • Aggregation can be used to group items together.
  • In the Query settings you could for example try to remove duplicates.

Especially when you have more complicated views with relationships, you might get duplicates. Check Views Distinct module in Drupal 7: "How To Remove Views Duplicates":

For individual fields you can use STYLE SETTINGS to add CSS classes. Check this on how to use tokens to do it in Drupal 7:

Samuli Natri is the founder of He started building Drupal sites in 2010 with Drupal 6. He attended Helsinki University and Helsinki University of Technology (Social Sciences and Computer Science). Read more...

Add new comment