<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#{{ anchor_id }}">
    Launch demo modal
</button>
  
<!-- Modal -->
<div class="modal fade" id="{{ anchor_id }}" tabindex="-1" aria-labelledby="{{ anchor_id }}-label" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="{{ anchor_id }}-label">Modal title</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>

            <div class="modal-body">
                {% for _content in content %}
                {{ _content.to_html() }}
                {% endfor %}
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
