Cakephp:添加后 3 分页设计已损坏 Bootstrap

Cakephp : 3 Pagination design has broken After Add Bootstrap

我已将此代码添加到我的 index.ctp 文件中,当我尝试添加下一个和上一个选项时,这里的设计已被破坏。

<div class="paginator">
    <nav>
        <ul class="pagination">
            <?= $this->Paginator->prev('< ' . __('previous')) ?>
            <?= $this->Paginator->numbers() ?>
            <?= $this->Paginator->next(__('next') . ' >') ?> 
        </ul>
    </nav>
        <p><?= $this->Paginator->counter() ?></p>
</div> 

图像看起来像

这里是

<?= $this->Paginator->numbers() ?>

它创建了一个带有 class 分页的 ul,所以我需要将上一个和下一个列表添加到这个 ul 列表中,我该怎么做?请任何人帮助我。

看看这个Pull Request

中的讨论

解决方法是这样的:

<ul class="pagination">
    <?= $this->Paginator->prev('< ' . __('previous')) ?>
    <?= $this->Paginator->numbers(['before' => '', 'after' => '']) ?>
    <?= $this->Paginator->next(__('next') . ' >') ?>
</ul>

试试这个。它对我来说很好用。

<div class="pagination pagination-right">
<span class="pull-left">
    <?php
    echo $this->Paginator->counter(
            'Showing {{start}} to {{end}} of total {{count}}'
    );
    ?>
</span>
<ul class="">
    <?php
    echo $this->Paginator->prev(__('previous'), array(), null, array('class' => 'prev disabled'));
    echo $this->Paginator->numbers(array('separator' => ''));
    echo $this->Paginator->next(__('next'), array(), null, array('class' => 'next disabled'));
    ?>
</ul>

我已经通过下面的代码解决了,这里是 link solution。@ Ayman Alkum 给出了线索​​。

 <ul class="pagination">
          <?= $this->Paginator->prev('< ' . __('previous')) ?>
          <?= $this->Paginator->numbers(['before' => '', 'after' => '']) ?>
          <?= $this->Paginator->next(__('next') . ' >') ?>
 </ul>