Trying to achieve a row column layout with batch I tried to code an output in twig that should look the following ( 2 columns in one row), i figured that i will need the batch function

     &lt;div class="row"&gt;
      &lt;div class="col-sm-6"&gt;Content&lt;/div&gt;
      &lt;div class="col-sm-6"&gt;Content&lt;/div&gt;
     &lt;/div&gt;    
 &lt;div class="row"&gt;
      &lt;div class="col-sm-6"&gt;Content&lt;/div&gt;
      &lt;div class="col-sm-6"&gt;Content&lt;/div&gt;
     &lt;/div&gt;


My attempt is : 

 {% for block in entry.content1|batch(2) %}
  &lt;div class="row"&gt;
    {% for block in row %}
    &lt;div class="col-sm-6"&gt;Content&lt;/div&gt;
    {% endfor %}
  &lt;/div&gt;
 {% endfor %}


but it doesn't work like that, i looked it up in the twig documentation, the error from craft i get is "Variable "row" does not exist", so i tried changing it to {% for entry in block %} but that doesn't work either.
I think you're getting your variable names mixed up. Something like this should work:

{% for row in entry.content1|batch(2) %}
&lt;div class="row"&gt;
   {% for block in row %}
   &lt;div class="col-sm-6"&gt;Content&lt;/div&gt;
   {% endfor %}
&lt;/div&gt;
{% endfor %}


I've changed the name of the first block to row.