<div class="imageCounter">
{% for item in page.blogpage_images.all %}
{{ forloop.counter }} of {{ forloop.counter }}
{% endfor %}
</div>
of {{ forloop.counter }}
是我想在列表中显示项目数的部分吗?
答案 0 :(得分:2)
仅显示博客页面图像的数量:
{% for item in page.blogpage_images.all %}
{{ forloop.counter }} of {{ page.blogpage_images.all.count }}
{% endfor %}