Home > php教程 > php手册 > Thinkphp分页样式改造Bootstrap版本

Thinkphp分页样式改造Bootstrap版本

WBOY
Release: 2016-06-07 11:42:50
Original
1335 people have browsed it

Thinkphp分页样式改造成Bootstrap版本,还是非常简单的。
1.修改类库,目录:ThinkPHP/Extend/Library/ORG/Util/Page.class.php
把所有分页的样式加上

  • 标签

    2.程序调用类库,关键是$Page->setConfig    import('ORG.Util.Page');// 导入分页类<br> $count      = $this->dao->where($map)->count();//总数量<br> $Page       = new Page($count,5);<br> // 实例化分页类 传入总记录数和每页显示的条数<br> $Page->setConfig('theme', '<li><a>%totalRow% %header%</a></li> %upPage% %downPage% %first%  %prePage%  %linkPage%  %nextPage% %end% ');<br> $show       = $Page->show();// 分页显示输出<br> $this->assign('page',$show);// 赋值分页输出            4.模板内容<div> <br>     <ul> <br>        <?php echo $page;?><br>     </ul> <br> </div>Thinkphp分页样式改造Bootstrap版本

    更多Bootstrap模板,访问http://www.js-css.cn JS代码网


    附件 Page.class.zip ( 2.08 KB 下载:445 次 )

    AD:真正免费,域名+虚机+企业邮箱=0元

  • source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Recommendations
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template