当达到多个元素时如何将View拆分为多个页面?
我正在使用视图来显示画廊。现在我已经设置了视图,因此它只显示 50 个元素,但我希望它显示一个“下一步”按钮,将您带到下一批元素。最好使用 AJAX / 无需重新加载,但这不是必需的。
我该怎么做?我已经查看了所有选项并搜索了一个可以实现此目的的模块,但没有成功,但我确信它是一个标准功能,你们可以帮助我。
感谢您的阅读。
I am using Views to display a gallery. Right now I have set up the View so it onlys shows 50 elements, but I want it to display a "Next" button that takes you to the next batch of elements. Preferably using AJAX / without reloading, but its not necessary.
How can I do this? I have looked at all the options and searched for a module that does that with no success, but I am sure its a standard funcionality and you people can help me.
Thank you for reading.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
观点是正确的。告诉它使用寻呼机,以及每页使用多少个寻呼机。这会将结果拆分为每页 X 个部分,并且您仍然可以使用 AJAX。
如果您正在谈论分组,例如显示所有集 A,然后在集 B 旁边,您可以尝试按主标识符进行分组,并查看是否按页分组。这也是视图的一部分。
It's right in views. Tell it to use a pager, and how many per page. That will split the results into X per page and you can still use the AJAX with it.
If you are talking about grouping, like show all set A, then next to set B, you could try grouping by a primary identifier and see if that groups per page. That is also part of Views.