title: How to use if condition in twig template  with twig tags inside in symfony2
body: <p>I am trying to use this</p>
  
  <pre><code>{% if not app.request.isXmlHttpRequest %}
     {% block body %}
     &lt;div&gt;{{ form_widget(form) }}&lt;/div&gt;
  {% endif %}
  </code></pre>
  
  <p>And i get error that unexpected enfif tag after block tag</p>