Answers.Body: <p>You <em>can't</em> execute multiple statements inside of a single <code>{% %}</code> block.</p>
  <p>You <em>can</em> have a single statement that is multi-line.</p>
  <p>See here for more info: <a href="https://stackoverflow.com/questions/31111516/does-twig-support-executing-multiple-statements-inside-a-single-block">https://stackoverflow.com/questions/31111516/does-twig-support-executing-multiple-statements-inside-a-single-block</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-10T03:36:36.500Z
Answers.LastActivityDate: 2020-11-10T03:36:36.500Z
Answers.UserDisplayName: Brad Bell
Body: <p>Instead of using:</p>
  <pre><code>{% ... %}
  {% ... %}
  {% ... %} 
  </code></pre>
  <p>For each line, i'd like to know if there is a way to do something like:</p>
  <pre><code>{%
  
  ...
  ...
  ...
  
  %}
  </code></pre>
  
Tags: <templating>
Title: Is there any way to code multiple lines in a twig file?
ThreadText: # Is there any way to code multiple lines in a twig file?
  
  (Asked by: username_0 on 2020-11-09)
  
  Instead of using:
  
  ```
  {% ... %}
  {% ... %}
  {% ... %} 
  
  ```
  
  For each line, i'd like to know if there is a way to do something like:
  
  ```
  {%
  
  ...
  ...
  ...
  
  %}
  
  ```
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-11-10. Score: 2
  
  You *can't* execute multiple statements inside of a single `{% %}` block.
  
  You *can* have a single statement that is multi-line.
  
  See here for more info: <https://stackoverflow.com/questions/31111516/does-twig-support-executing-multiple-statements-inside-a-single-block>
  
  
  ---
  
  