Handling Multiple Token Values in View Arguments

Created on 12 December 2023, about 1 year ago
Updated 13 August 2024, 4 months ago

Problem/Motivation

When passing View arguments using token values, it could be a single value or multiple values. For example, if you have multiple taxonomy term IDs like NULL/NULL/7876, you will need to pad the empty values with null if they are optional. This will still allow the view to respect the only filter. But if you had NULL/NULL/NULL, then no results will be shown from the view. I was able to solve this issue by setting empty values as 'NULL' and then checking to see if only those values, if only NULL values were defined, then I would just pass along an empty array which allows the view to render content without any contextual filters applied.

πŸ› Bug report
Status

Needs work

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States droath

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024