Quantcast
Viewing all articles
Browse latest Browse all 57

View filtering all records with no argument, empty text with invalid argument

I have a view with a block display that I need to filter by:

  • All records when no argument present e.g. /foo
  • All nodes with specified valid taxonomy term ID e.g. /foo/bar
  • Show empty text when taxonomy term ID is attached to no content e.g. /foo/baz

  • WHEN THE FILTER VALUE IS NOT AVAILABLE is set to Display all results for the specified field.
  • WHEN THE FILTER VALUE IS AVAILABLE OR A DEFAULT IS PROVIDED is set to Specify validation criteria, Taxonomy Term.
  • Filter value type is set to term name converted to term ID.
  • Transform dashes in URL to spaces in term name filter values.
  • Action to take if filter value does not validate is set to Display contents of "No results found".

  • The view preview is working correctly, adding taxonomy_term_data_field_data_field_VOCAB.tid = 'xx' to the query but on the front-end it doesn’t appear to be working at all.
  • I have Global: Null as the first entry under Contextual filters as the argument needed to filter is the second argument in the URL string.

Viewing all articles
Browse latest Browse all 57

Trending Articles