Twig template breaks if argument names don’t follow Twig naming rules

Created on 18 August 2025, about 2 months ago

Problem/Motivation

When defining arguments for a SPA/Twig block, the argument name is inserted directly into the Twig template.
If the argument name contains a dash (-) instead of underscore (_), Twig cannot parse the variable and the template will not render.

This is confusing for site builders because the UI does not warn them, and the error only shows up when rendering.

Steps to reproduce

Create a new SPA.

Add an argument with the name my-argument-name.

Use it in the Twig template:

Test: {{ my-argument-name }}

Save and render.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Documentation

Created by

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