Missing Page Number token

Created on 31 October 2009, over 15 years ago
Updated 7 May 2025, 4 days ago

Problem/Motivation

Tokens for Drupal 5 & 6 came with a token for the Page Number. This exposed the ?page=1 part of the URL (for pages with pagers on them) as a single numeric token which could be used with modules such as Page Title. Google tends to get really annoyed with different pages having the same URL, so the combinaton of Page Title and the page-number token can really help View's pages with Pagers enabled on them to not cause SEO damage to a website.

Proposed resolution

Add [site:page-number] to system tokens.

This patch has been rerolled several times, it was originally from "Token's DRUPAL-6--1 branch".

Steps to test:

  • Requires the token module.
  • Click 'Browse available tokens' from somewhere in the UI
  • Expand the 'Site Information' section. With patch, a 'Page Number' token will be visible - [site:page-number]
  • Add the token somewhere, view whatever you've added it to, then verify it detects ?page=0, ?page=1 etc. from the URL

Remaining tasks

- Review patch.

User interface changes

New token, but no CSS/JS/HTML changes.

API changes

None.

Data model changes

None.

Feature request
Status

Postponed: needs info

Version

11.0 🔥

Component

system.module

Created by

🇬🇧United Kingdom nicholasthompson

Live updates comments and jobs are added and updated live.
  • Needs beta evaluation

    Since the first beta of Drupal 8 was released, every new 8.0.x issue should have a beta evaluation in the summary, to help clarify whether the 8.0.0 release is a target for that issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • 🇦🇺Australia mstrelan

    Considering token contrib module has [current-page:page-number] is this still required? Setting to PMNMI to determine if people still want this in core.

Production build 0.71.5 2024