Hi,
I’m starting my journey in replacing dynamic content with Twig.
Using DC, this works in a text field: Bedankt {{ url.param({"key":"firstname"}) }}!
When I write this Twig-style, it doesn’t: Bedankt {{ url.param.firstname | default("") }}
What am I missing here?
Secondly, I want to achieve something that I think hasn’t been possible with DC, but is with Twig:
- if the parameter ‘firstname’ is not present the text should state
Bedankt!
- if the parameter ‘firstname’ is present text should state
Bedankt {{first name}}!
The challenge on this second question: only insert a blank space when the url-parameter is present.
Looking forward to the answers on both questions!