Issue Feature Closed

#111417Feature Request: Native Support for Editor Variables in TYPO3 Core

Henry Schlenz 11/12/26, 00:36 updated 11/12/26, 17:44

Description

## Summary

TYPO3 Core should provide a native mechanism for using dynamic variables (placeholders) in editorial content and other relevant backend-managed fields.

This would allow editors to insert dynamic values directly into content without requiring TypoScript, custom extensions, or administrator intervention.

The mechanism should be extensible enough to support not only predefined system variables but also project-specific values, such as site settings.

## Motivation

Many TYPO3 installations rely on extensions or custom implementations to provide dynamic values in editorial content.

A common example is displaying the current year in copyright notices, advertisements, headlines, or other content that needs to be updated automatically.

For example, the Bootstrap Package extension provides the `###CURRENTYEAR###` placeholder. However, relying on an individual extension for such basic functionality creates an unnecessary dependency, particularly when projects decide to change or remove extensions.

A native, extensible solution in TYPO3 Core would provide a consistent way of handling dynamic editorial values across different installations.

## Proposed Functionality

Introduce a general mechanism for editor variables that can be used directly in editorial content and other supported fields.

### 1. Built-in System Variables

TYPO3 Core should provide a set of predefined variables, for example:

- `{currentYear}` – Current calendar year.
- `{nextYear}` – Following calendar year.
- `{currentDate}` – Current date.
- `{currentMonth}` – Current month.

The exact variable names and syntax should follow TYPO3 Core conventions.

### 2. Extensible Variable System

The implementation should allow additional variables to be registered through TYPO3 extensions or site configuration.

This could include:

- Site-specific settings.
- Organization names and contact information.
- Configurable editorial values.
- Other dynamically generated values.

Ideally, this would provide a general API for registering and resolving variables rather than implementing individual placeholders separately.

### 3. Availability in Editorial Content

Variables should be usable directly by editors without requiring TypoScript.

Potential application areas include:

- Text content and RTE fields.
- Headlines and teasers.
- Page titles and metadata.
- Other suitable text-based fields managed through the TYPO3 backend.

The mechanism should work consistently across supported content areas wherever technically feasible.

### 4. Caching Considerations

Dynamic values must be resolved correctly when cached pages are generated.

TYPO3 should account for changes in time-dependent variables when determining cache validity.

For example, a page containing `{currentYear}` should not continue displaying the previous year after New Year’s Day simply because the page is cached.

## Example Use Cases

Copyright notice:

`© {currentYear} Example Organization`

Annual event:

`Applications for the {nextYear} academic year are now open.`

Recurring campaign:

`Discover our offers for {currentYear}.`

These examples illustrate how editors could maintain content without manually updating dates or depending on extension-specific placeholders.

## Expected Benefits

- No additional extension required for basic dynamic variables.
- Less repetitive editorial maintenance.
- Consistent placeholder syntax across TYPO3 installations.
- Extensibility for project-specific variables.
- Reduced dependency on individual extensions.
- A foundation for more advanced dynamic editorial functionality.

## Implementation Considerations

The exact implementation and supported fields should be determined by the TYPO3 Core team.

A general editor-variable API would be preferable to introducing individual hardcoded placeholders, as it would allow the functionality to grow over time.

The implementation should also consider RTE compatibility, cache invalidation, localization, and security when resolving registered variables.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Georg Ringer commented and changed status New Closed Tags Related to #110237 <span data-processor="relativetime" data-value="2026-11-12T17:44:51+00:00" > 11/12/26, 17:44 </span>

    Not everything has to be done by the Core, and this sounds like a perfect use case for an extension. For a project, a small extension with a PSR-15 middleware that replaces the placeholders in the rendered output covers the own use cases (this is what the Bootstrap Package does for ###CURRENTYEAR###).

    There are too many open decisions that differ from project to project, so a single Core solution would either be too limited or too complex:

    • Do editors define the variables themselves, or are they only provided by developers?
    • Is TypoScript needed for the replacement, or should it work without?
    • Are variables translated differently per language, and where are those translations maintained?
    • Where may variables be used (RTE, headlines, page titles, metadata) and how are they escaped there?
    • Time-dependent values like {currentYear} conflict with page caching, so the cache lifetime of every page using them would need to be limited.

    Every feature in the Core has to be maintained, documented and kept compatible for years, and the Core team’s capacity is limited. For something that can be solved well in an extension, that cost is hard to justify.

    Closing as this is best solved in extensions. Hope you understand!

    PS: If you are interested in coding support, happy to help!