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
Add a link to Twig documentation in the twig template help text.
Comments
Comment #2
gashunk commentedComment #3
gashunk commentedComment #5
gashunk commentedComment #6
harlor commentedComment #7
gashunk commentedAdd argument name validation and checked the uniqueness of the SpaArguments.
Comment #9
hydra commented