Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reusable code snippets/Dynamic content does not work in Mautic 4.4.10 #39

Open
tacevski opened this issue Feb 26, 2024 · 1 comment
Open

Comments

@tacevski
Copy link

Trying to use dynamic content as per Example 3: Reusable code snippets using the following...

{% TWIG_BLOCK %} {{include('dc:test_content')}} {% END_TWIG_BLOCK %}

I get the error...

mautic.NOTICE: Swift_TransportException: Error while rendering part text: line 1: attempt to call non-existent macro 'include' (uncaught exception) at /var/www/mautic/app/bundles/EmailBundle/Swiftmailer/Transport/AbstractTokenArrayTransport.php line 291 while running console command mautic:emails:send []

@IonutOjicaDE
Copy link

Your code should be

{% TWIG_BLOCK %}{{ include('dc:test_content') }}{% END_TWIG_BLOCK %}

I added one space char after {{ and before }}. Twig is very strict regarding the spaces...
Also the space before {{ and after }} : I suppose these will be printed out in the end - I removed them in the code above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants