Score:0

How to make a View's exposed filter value match the Context Filter term name provided in the View path?

ng flag

In Drupal 9 we have a View of Nodes with a Context Filter (Has Term Name to Term ID) and an exposed Filter for the term (called Resource Type). I can go to the Views path (/downloads) and add the term name (/downloads/white-papers) and the results are filtered properly but the exposed filter does not reflect the "white-papers" filter and this shows "- All -" as the selected filter.

How can we make the exposed filter reflect the context filter from the URL?

enter image description here enter image description here

ru flag
Those are two completely different things. A contextual filter is not the same as an exposed filter, even when applied on the same field. To pre-fill the exposed filter, use HTTP GET parmeter like `mysite.com/view-page?MY_EXPOSED_FILTER_FIELD=MY_VALUE`
quantumized avatar
ng flag
Yes, I understand but we wanted to use the main filter as part of the URL and not a URL parameter (for SEO reasons). I was hoping for some guidance on how to populate the exposed filter to match the URL path context filter.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.