Quote:You are forced to handle/change something that would normally not be necessary.
What?!
Are you saying that you'd rather CodeIgniter force you into a specific CSS framework? If I preferred Foundation over Bootstrap, I would have to modify the CSS just to use a simple, framework agnostic, HTML list.
No thanks.
Quote:Likewise, the page numbering default is query parameter instead of URI segment.
If you need this changed, look into routing.
Untested:
PHP Code:
$routes->add('products/show/(\d+)', 'Products::show?page=$1');
Quote:I keep looking at the forum pages and they are organized inversely to the default of the framework. Obviously something is wrong.
Obviously the forum DOESN'T USE CODEIGNITER.
Quote:Please, has anyone tried and managed, following the instructions in the manual, to change the page numbering mode, as shown below?
Yes, here's mine for Bootstrap 4, located under app\Views\Pagers\bootstrap_full.php
PHP Code:
<?php
/**
* @var \CodeIgniter\Pager\PagerRenderer $pager
*/
$pager->setSurroundCount(5); //specifies than we want to show FIVE links to either side of the current page link. The only parameter that it accepts is the number of links to show.
?>
<nav aria-label="<?= lang('Pager.pageNavigation') ?>">
<ul class="pagination pagination-sm">
<?php if ($pager->hasPrevious()) : ?>
<li class="page-item">
<a class="page-link" href="<?= $pager->getFirst() ?>" aria-label="<?= lang('Pager.first') ?>">
<span aria-hidden="true"><?= lang('Pager.first') ?></span>
</a>
</li>
<li class="page-item">
<a class="page-link" href="<?= $pager->getPrevious() ?>" aria-label="<?= lang('Pager.previous') ?>">
<span aria-hidden="true">«</span>
</a>
</li>
<?php endif ?>
<?php foreach ($pager->links() as $link) : ?>
<li class="page-item<?= $link['active'] ? ' active' : '' ?>">
<a class="page-link" href="<?= $link['uri'] ?>">
<?= $link['title'] ?>
</a>
</li>
<?php endforeach ?>
<?php if ($pager->hasNext()) : ?>
<li class="page-item">
<a class="page-link" href="<?= $pager->getNext() ?>" aria-label="<?= lang('Pager.next') ?>">
<span aria-hidden="true">»</span>
</a>
</li>
<li class="page-item">
<a class="page-link" href="<?= $pager->getLast() ?>" aria-label="<?= lang('Pager.last') ?>">
<span aria-hidden="true"><?= lang('Pager.last') ?></span>
</a>
</li>
<?php endif ?>
</ul>
</nav>