jamesl
1
Your software
My Mautic version is: 6.03
My PHP version is: 8.1
My Database type and version is: Latest
Your problem
My problem is:
I am trying to add twig in code mode in M6.0.3
how do I enable it?
I have installed mautic as a normal installation and have not touched anything.
- My emails are full of twig code and is not converting
- I have added twig code tothe Code Mode template and pasted it into the Advanced tab and HTML area there
Please assist since noone seems to know whereto find it abd how to enable it.
There is nothging like enable twig or similar in hteadvanced tab.
Please assist
These errors are showing in the log:
Steps I have tried to fix the problem:
jamesl
2
when I usethe
{% TWIG_BLOCK %}
Dear {{ contact.firstname }},
{% if contact.company_notes is defined and contact.company_notes %}
{{ contact.company_notes }}
{% endif %}
{% END_TWIG_BLOCK %}
no variables are collected from the contact profile
jamesl
3
I found how you do it
you simply open email and select code mode and hten enter the advanced tab and htere you can add twig code.
all started working after i added the module Advanced Templates and started adding the {% TWIG_BLOCK %} andend block
it is superior to use this as it can be tailored to a lot.
do not forgetto use the lead.{variable} when you use this module.
the result is fantastic
system
Closed
4
This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.