Allow token replacement for array URLs on views custom URLs

Created on 3 November 2020, over 3 years ago
Updated 26 February 2024, 4 months ago

Problem/Motivation

When using a views "More link" and "Link display" set to "Custom URL", only the query fragment values are replaced but not the keys, these could be useful for example to link to a multiple valued exposed filter.

So "test/field=10" can be generated but is not possible to generate "test/field[10]=10".

Steps to reproduce

Set up a view with exposed filters that accept multiple values. Then set another view that links to the first one and use tokens to generate the url in a way that the token is something like /test-view?field_name[{{ arguments.field_argument_target_id }}]={{ arguments.field_argument_target_id }}

Proposed resolution

Replace the array_walk_recursive code by a custom recursive function that alters both keys and values, given that array_walk_recursive is not able to modify keys.

User interface changes

None

API changes

None

Data model changes

None

✨ Feature request
Status

Needs work

Version

11.0 🔥

Component
Views  →

Last updated about 5 hours ago

Created by

🇪🇸Spain pcambra Spain, 🇪🇺

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024