Twitter bootstrap Cakephp:3添加引导后分页设计已中断
我在index.ctp文件中添加了这段代码,当我尝试添加下一个和上一个选项时,这里的设计被破坏了Twitter bootstrap Cakephp:3添加引导后分页设计已中断,twitter-bootstrap,pagination,cakephp-3.0,Twitter Bootstrap,Pagination,Cakephp 3.0,我在index.ctp文件中添加了这段代码,当我尝试添加下一个和上一个选项时,这里的设计被破坏了 <div class="paginator"> <nav> <ul class="pagination"> <?= $this->Paginator->prev('< ' . __('previous')) ?> <?= $this->Paginato
<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() ?>
它创建了一个具有类分页的ul,所以我需要将上一个列表和下一个列表添加到这个ul列表中,我如何才能做到这一点?请任何人帮助我 看看这篇文章中的讨论 解决办法是:
<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>
我用下面的代码解决了这个问题,这是链接。@Ayman Alkum给出了线索
<ul class="pagination">
<?= $this->Paginator->prev('< ' . __('previous')) ?>
<?= $this->Paginator->numbers(['before' => '', 'after' => '']) ?>
<?= $this->Paginator->next(__('next') . ' >') ?>
</ul>
似乎上一个和下一个不是li
项目,因此它们不属于ul。。你检查时是这样吗?你能给我提供链接吗?