Support Tokens for Offset

Created on 20 July 2024, 4 months ago
Updated 4 August 2024, 3 months ago

Problem/Motivation

The current 'Some' and 'None' Pager plugin in Drupal only allows static numerical values for the offset. This limitation prevents users from dynamically filtering and displaying data using tokens. Introducing the ability to use tokens for the offset would allow for more flexible and dynamic view configurations.

Steps to reproduce

1. Create a view using the existing Some Pager plugin and None Pager Plugin.
2. Notice that the offset setting only accepts static numerical values and does not support tokens.

Proposed resolution

Extend the NonePager plugin to support tokens in the offset field. This enhancement will enable dynamic data filtering and display using tokens. The proposed implementation involves modifying the NonePager plugin to replace tokens with their corresponding values and convert them to integers as needed.

User interface changes

The view settings form will include an offset input field that supports tokens, making it easier for users to configure dynamic offsets.

API changes

None.

Data model changes

The schema for views_pager_token settings will be updated to include the new offset field and change the items_per_page field to support tokens.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇯🇵Japan umekikazuya

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