Default tokens for token types

Created on 19 April 2013, about 12 years ago
Updated 3 April 2025, 3 months ago

Problem

Token types are objects that cannot just be converted to a particular piece of output automatically. Example: node_tokens() handles node:created tokens, and instead of letting system_tokens() (which defines the date type) handle the replacement entirely, it only does so for node:created:property tokens. node:created is replaced by node_tokens(), and so is node:changed.

Solution

Require data types to have a default property, so the token API can relieve hook_tokens() implementations of some of their responsibilities and create more consistency among replacements.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

token system

Created by

πŸ‡¬πŸ‡§United Kingdom Xano Southampton

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Status changed to Closed: outdated 2 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Since there's been no follow up in 3+ months going to close this one out, but if still a desired feature please re-open.

    Thanks!

Production build 0.71.5 2024