Display something in the middle of post content My entry content is displayed like this:
{% for block in entry.postContent.all() %}
  &lt;div class=&quot;my-4&quot;&gt;
        {% if block.type == 'text' %}
      {{ block.text }}
    {% elseif block.type == 'image' %}
      {% for image in block.image.all() %}
        &lt;img src=&quot;{{ image.url }}&quot; alt=&quot;{{ image.title }}&quot; /&gt;
      {% endfor %}
    {% endif %}
  &lt;/div&gt;
{% endfor %}

I want to display some other things in the middle of this content but have no idea how I can do it. Maybe someone have any thoughts?
There is a loop variable available within your for loop which you might be able to use here (docs). This starts at 1 and increment everytime your loop runs.
Using loop.index, you could do something like this:
{# Fetch your blocks #}
{% set blocks = entry.postContent.all() %}

{# Counts how many blocks you have in total #}
{% set totalBlocks = blocks | length %}

{# Divide your totalBlocks by 2 and round to find the 50% mark in your content #}
{% set halfwayPoint = (totalBlocks / 2) | round %}

{% for block in blocks %}
    &lt;div class=&quot;my-4&quot;&gt;

        {# When you reach halfway, inject #}
        {% if loop.index == halfwayPoint %}
            the content you want to inject
        {% endif %}

        {% if block.type == 'text' %}
            {{ block.text }}
        {% elseif block.type == 'image' %}
            {% for image in block.image.all() %}
                &lt;img src=&quot;{{ image.url }}&quot; alt=&quot;{{ image.title }}&quot; /&gt;
            {% endfor %}
        {% endif %}
    &lt;/div&gt;
{% endfor %}