You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Dynamic Content I declare some variables using {% set products = items.products %}, but It returns me a 500 Error.
On the Mautic error log I got this message: [2020-03-09 12:36:09] mautic.CRITICAL: Uncaught PHP Exception Twig_Error_Syntax: "Unexpected token "operator" of value "%" in "dc:featured-products" at line 3." at /vendor/twig/twig/lib/Twig/ExpressionParser.php line 208 {"exception":"[object] (Twig_Error_Syntax(code: 0): Unexpected token \"operator\" of value \"%\" in \"dc:featured-products\" at line 3. at /vendor/twig/twig/lib/Twig/ExpressionParser.php:208)"} []
Does the 'include' TWIG function support variable declaration or anything that starts with {% ?
In the example of this plugin there is only variable printing with {{ }}.
The text was updated successfully, but these errors were encountered:
I have a similar issue. I've successfully used techniques from Example 1 & 2. I was unable to replicate working Example 3, despite closely following the documentation. If not for the cart functionality, I was hoping it could be a workaround Matutics lack of globally updatable variables.
It seems this feature doesn't work anymore. At least not on Mautic 2.16.2 & PHP 7.3.18.
Hi !
I'm trying to use a reusable code snippet creating a Dynamic Content and including it on my email using the next code:
{% TWIG_BLOCK %} {{ include('dc:featured-products') }} {% END_TWIG_BLOCK %}
In the Dynamic Content I declare some variables using {% set products = items.products %}, but It returns me a 500 Error.
On the Mautic error log I got this message:
[2020-03-09 12:36:09] mautic.CRITICAL: Uncaught PHP Exception Twig_Error_Syntax: "Unexpected token "operator" of value "%" in "dc:featured-products" at line 3." at /vendor/twig/twig/lib/Twig/ExpressionParser.php line 208 {"exception":"[object] (Twig_Error_Syntax(code: 0): Unexpected token \"operator\" of value \"%\" in \"dc:featured-products\" at line 3. at /vendor/twig/twig/lib/Twig/ExpressionParser.php:208)"} []
Does the 'include' TWIG function support variable declaration or anything that starts with {% ?
In the example of this plugin there is only variable printing with {{ }}.
The text was updated successfully, but these errors were encountered: