I have that simple variable in my javascript

var toLoad = '{% "include _views/reviews.twig" %}';

and on a page load I get template error that is defined in the title of question.

That variable is defined in template, that includes another template and in that included template is called some 'class' to load reviews.twig from our variable defined in parent template.

Any thoughts?


You've got a quote in the wrong place.


{% "include _views/reviews.twig" %}

should be this...

{% include "_views/reviews.twig" %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.