最佳多页面导航

发布于 2024-08-02 07:06:56 字数 370 浏览 2 评论 0原文

我遇到过许多网站甚至桌面应用程序都具有面包屑类型控件来导航信息页面。

例如,给定 X 个页面,其中用户当前位于 N 页,SOFU 有一个面包屑控件,以以下形式呈现页面导航:

(X[N-1])(X[0])...(X[N-2])(X[N-1])(X[N])(X[N+1])(X[N+2])...(X[X-1])(X[N+1])

我已经见过该控件的各种变体。我想知道是否有一种方法可以优化这种控制,以便用户可以以最少的跳转次数导航到任何数据页面。我知道有明显的答案,例如允许用户指定页码或手动输入网址,但我正在考虑一种更学术的解决方案,其中没有其他替代方案。

我不太聪明,数学也很烂。有什么想法可以从哪里开始而不需要暴力解决方案吗?

I have encountered many web sites and even desktop applications that have a breadcrumb type control to navigate pages of information.

For example, given X pages where the user is currently on page N, SOFU has a bread crumb control that presents page navigation in the form of:

(X[N-1])(X[0])...(X[N-2])(X[N-1])(X[N])(X[N+1])(X[N+2])...(X[X-1])(X[N+1])

I have seen all sorts of variants of this control. What I am wondering is there a way to optimize this sort of control so the user can navigate to any page of data in a minimum number of jumps. I know there are obvious answers like allow the user to specify a page number or hand enter a url, but I am thinking of a more academic solution where the alternatives are not available.

I am not very bright and suck at math. Any ideas where to even start without brute forcing a solution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

公布 2024-08-09 07:06:56

您可以添加斐波那契序列中从当前页面到序列开头和结尾的页面链接,如下所示:

(X[0])...(X[N-8])...(X[N-5])...(X[N-3])(X[N-2]) (X[N-1])(X[N])(X[N+1])(X[N+2])(X[3])...(X[N+5])... (X[N+8])...(X[X-1])

我认为这将为您提供良好的链接与空间比率,但它仍然需要大量空间。如果这还不够好,您应该考虑您的用户对他们想要的页面的具体了解程度以及您可以向他们提供/他们可以容忍的页面链接数量。

You might add links for pages in the fibonacci sequence from the current page to the start and end of the sequence, like so:

(X[0])...(X[N-8])...(X[N-5])...(X[N-3])(X[N-2])(X[N-1])(X[N])(X[N+1])(X[N+2])(X[3])...(X[N+5])...(X[N+8])...(X[X-1])

I think that would give you a good ratio of links to space, but it'll still take plenty of space. If that's not good enough, you should think about how specifically your users know the page they want and how many page links you can offer them/they can tolerate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文