Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twig with handlebars js curly braces

I am using twig and handlebar.js with symfony2. I am making handlebar templates in twig file using tag.

But the problem is both use {{ }} curly braces. So the values used for handlebars are mixed with twig. So on page load exception appears.

Is there any way to use both at the same time.

Thank you in advance.

Regards

like image 687
user3580210 Avatar asked Aug 28 '14 12:08

user3580210


1 Answers

Use the verbatim tag.

{% verbatim %}
  <ul>
    {{#items}}
      <li>{{name}}
    {{/items}}
  </ul>
{% endverbatim %}
like image 141
Adam Elsodaney Avatar answered Oct 12 '22 19:10

Adam Elsodaney