我想分页我从数据库(MongoDB)获取的图像视图。我在下面附加了我的代码。
<div class="row">
<% if(files) { %>
<% files.forEach(function(file) { %>
<% if(file.isImage){ %>
<!-- Single Product -->
<div class="col-12 col-sm-6 col-lg-4">
<div class="single-product-wrapper">
<!-- Product Image -->
<div class="product-img">
<img src="image/<%=file.filename %>" alt="">
<!-- Product Badge -->
<div class="product-badge offer-badge">
<span>-30%</span>
</div>
<!-- Favourite -->
<div class="product-favourite">
<a href="#" class="favme fa fa-heart"></a>
</div>
</div>
<!-- Product Description -->
<div class="product-description">
<span><%= file.metadata.brand %></span>
<a href="single-product-details.html">
<h6><%= file.metadata.name %></h6>
</a>
<p class="product-price">Rs. <%= file.metadata.price %>
</p>
<!-- Hover Content -->
<div class="hover-content">
<!-- Add to Cart -->
<div class="add-to-cart-btn">
<a href="#" class="btn essence-btn">Add to Cart</a>
</div>
</div>
</div>
</div>
</div>
<% } else { %>
<p>ERROR</p>
<% } }) } else {%>
<p>No files</p>
<% } %>
</div>
如何将分页设置为此视图,我想每页显示6张图像。有人说了设置我的画廊视图的任何技巧