[英]When pagination is done, I want to do next and previous links on particular object page
I'm working about some listing and gallery in codeigniter with PHP. 我正在使用PHP在codeigniter中处理一些列表和库。 I've done all the searches and good search result page with pagination.
我已经完成了所有搜索和具有分页功能的良好搜索结果页面。
Now when I click on position in my search results list it gets me into page with single result, description etc. 现在,当我单击搜索结果列表中的位置时,它将带我进入单个结果,说明等页面。
My question is: how to smartly make "next" and "previous"links on this single result page? 我的问题是:如何在此单个结果页面上巧妙地建立“下一个”和“上一个”链接? After clicking next it goes to the page of next result etc.
单击下一步后,将转到下一个结果等页面。
Is there any other way than storing full search results in some array while browsing? 除了在浏览时将完整搜索结果存储在某个数组中之外,还有其他方法吗?
You can store the search conditions instead (much smaller -> can be stored for a long time, so you don't need to obfuscate the UX by sometimes showing prev/next and sometimes not) and add some generic user-independent caching layer to the search results. 您可以改为存储搜索条件(小得多->可以存储很长一段时间,因此您不需要通过有时显示上一个/下一个(有时不是)来混淆UX),并向其中添加一些与用户无关的通用缓存层搜索结果。 (This assumes that search results are not personalized and don't change much in time.)
(这假设搜索结果不是个性化的,并且不会随时间变化太多。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.