PHP Classes

File: system/Pager/Views/default_full.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   PHP GuestBook with Database   system/Pager/Views/default_full.php   Download  
File: system/Pager/Views/default_full.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP GuestBook with Database
GuestBook application using MySQL to store posts
Author: By
Last change:
Date: 6 months ago
Size: 1,213 bytes
 

Contents

Class file image Download
<?php

use CodeIgniter\Pager\PagerRenderer;

/**
 * @var PagerRenderer $pager
 */
$pager->setSurroundCount(2);
?>

<nav aria-label="<?= lang('Pager.pageNavigation') ?>">
    <ul class="pagination">
        <?php if ($pager->hasPrevious()) : ?>
<li>
                <a href="<?= $pager->getFirst() ?>" aria-label="<?= lang('Pager.first') ?>">
                    <span aria-hidden="true"><?= lang('Pager.first') ?></span>
                </a>
            </li>
            <li>
                <a href="<?= $pager->getPrevious() ?>" aria-label="<?= lang('Pager.previous') ?>">
                    <span aria-hidden="true"><?= lang('Pager.previous') ?></span>
                </a>
            </li>
        <?php endif ?>

        <?php foreach ($pager->links() as $link) : ?>
<li <?= $link['active'] ? 'class="active"' : '' ?>>
                <a href="<?= $link['uri'] ?>">
                    <?= $link['title'] ?>
</a>
            </li>
        <?php endforeach ?>

        <?php if ($pager->hasNext()) : ?>
<li>
                <a href="<?= $pager->getNext() ?>" aria-label="<?= lang('Pager.next') ?>">
                    <span aria-hidden="true"><?= lang('Pager.next') ?></span>
                </a>
            </li>
            <li>
                <a href="<?= $pager->getLast() ?>" aria-label="<?= lang('Pager.last') ?>">
                    <span aria-hidden="true"><?= lang('Pager.last') ?></span>
                </a>
            </li>
        <?php endif ?>
</ul>
</nav>