Allow tokens to be used in views custom more url

Created on 9 May 2023, over 1 year ago

Problem/Motivation

Currently there is no way to dynamically set up a custom url for more link in views display.

I use node_keep_token → module to create a custom token for the page e.g. [node-keep:news_overview:url].

In my views, I would like to display an overview of latest content and more link in the bottom that leads to the full overview page.

Would be nice to use the token in the custom url, so the path is dynamic and I do not need to worry about multilingual differences or path updates.

Steps to reproduce

Add a block views, enable more link, add token to custom url under link display settings.

Proposed resolution

Replace tokens before url parse in \Drupal\views\Plugin\views\display\DisplayPluginBase::getMoreUrl()

Remaining tasks

- Upload a patch
- Write some tests

✨ Feature request
Status

Active

Version

10.1 ✨

Component
Views  →

Last updated about 2 hours ago

Created by

🇺🇦Ukraine nginex

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

Comments & Activities

Production build 0.71.5 2024