0

我知道使用 CodeIgniter 分页库。但是使用 Bootstrap 分页类是令人困惑的。请帮我。如果可能的话给我一个例子。

4

2 回答 2

2

CodeIgniter 分页类真的很酷,但是我很难将它与 twitter Bootstrap CSS 框架集成,在初始化分页库时它就像是额外的十几个配置参数,所以我不得不修改 CodeIgniter 分页类以兼容与引导。

我在 application/libraries/ 文件夹下创建了一个新文件并将其命名为 MY_Pagination.php

与 Bootstrap 集成的 CodeIgniter 分页

于 2013-10-30T03:52:56.830 回答
-1
<?php if(!defined('BASEPATH')) exit('Direct Access Not Allowed');

/* This Application Must Be Used With BootStrap 3 *  */
$config['full_tag_open'] = "<ul class='pagination'>";
$config['full_tag_close'] ="</ul>";
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
$config['next_tag_open'] = "<li>";
$config['next_tagl_close'] = "</li>";
$config['prev_tag_open'] = "<li>";
$config['prev_tagl_close'] = "</li>";
$config['first_tag_open'] = "<li>";
$config['first_tagl_close'] = "</li>";
$config['last_tag_open'] = "<li>";
$config['last_tagl_close'] = "</li>";
于 2016-12-05T11:31:11.447 回答