Welcome Guest, Not a member yet? Register   Sign In
CI 4.0.3 is releasing soon - help wanted
#14

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.   Smile



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.   Smile



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">&laquo;</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">&raquo;</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> 
Reply


Messages In This Thread
RE: CI 4.0.3 is releasing soon - help wanted - by BilltheCat - 04-29-2020, 08:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB