【问题标题】:How to paginate though a sorted table in codeigniter?如何通过codeigniter中的排序表进行分页?
【发布时间】:2010-10-27 13:28:23
【问题描述】:

我正在使用默认分页器将 pae 偏移量添加到 uri(3),然后将排序数据放入并将关联数组放入表头中的 uri 中

echo anchor("/contact/index/$paging/".$this->uri->assoc_to_uri($assoc),$column);

目前我可以通过单击标题对 desc 和 asc 进行排序,但是当我想循环浏览页面时,它只会将页面偏移量放在 uri(3) 中,但我想在 uri(3) 中添加额外的 assoc页面链接。

目前分页器链接是这样制作的

$this->pagination->create_links();

但我希望能够为每个页面链接添加一个额外的关联

$this->pagination->create_links($this->uri->assoc_to_uri($assoc));

像这样。

【问题讨论】:

    标签: sorting codeigniter pagination


    【解决方案1】:

    我不得不对分页器库进行更改,因此我对其进行了扩展。

    我称它为 paginatorsortable

    http://gist.github.com/649102

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-07
      • 2016-01-30
      • 2020-05-05
      • 2010-09-12
      • 1970-01-01
      • 2015-03-10
      相关资源
      最近更新 更多