Allow token replacement for array URLs on views custom URLs

Created on 3 November 2020, about 4 years ago
Updated 31 January 2023, almost 2 years 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

10.1

Component
Views 

Last updated 29 minutes ago

Created by

🇪🇸Spain pcambra Asturies

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.71.5 2024