Laravel 4 Twitter Bootstrap 3的分页错误 [英] Laravel 4 Pagination bug with Twitter Bootstrap 3

查看:77
本文介绍了Laravel 4 Twitter Bootstrap 3的分页错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Laravel分页时,我相信生成的css类与引导程序2有关,而不与引导程序3有关.

When using Laravel Pagination, I believe that the css classes generated are relevant to bootstrap 2 and not bootstrap 3.

{{ $products->links() }}生成

<div class="pagination">
    <ul>
        <?php echo $presenter->render(); ?>
    </ul>
</div>

但是我希望它生成:

    <ul class="pagination">
        <?php echo $presenter->render(); ?>
    </ul>

在不更改框架代码laravel/framework/src/illuminate/pagination/views/slider.php的情况下,是否有更好/适当的方法来覆盖由{{ $products->links() }}生成的CSS/代码?

Without changing the framework code laravel/framework/src/illuminate/pagination/views/slider.php, is there a better / proper way of overriding the CSS / code generated by {{ $products->links() }}?

推荐答案

我在最新的更新之一中看到了一些内容,但我没有尝试过,但看来您要做的只是更改:

I saw something in one of the latest update, I haven't tried but it looks like all you have do do is change:

'pagination'=>'pagination :: slider',

'pagination' => 'pagination::slider',

在视图配置中:

'pagination'=>'pagination :: slider-3',

'pagination' => 'pagination::slider-3',

然后使用:

https://github.com/laravel/framework /blob/master/src/Illuminate/Pagination/views/slider-3.php

这篇关于Laravel 4 Twitter Bootstrap 3的分页错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆