Created
May 1, 2018 00:09
-
-
Save cezar08/7be3a92839585d40c3386945d171afd1 to your computer and use it in GitHub Desktop.
partial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if ($this->pageCount): ?> | |
| <nav> | |
| <ul class="pagination"> | |
| <!-- Previous page link --> | |
| <?php if (isset($this->previous)): ?> | |
| <li> | |
| <a href="<?= $this->url($this->route, [], ['query'=>['page'=>$this->previous]]); ?>" aria-label="Previous"> | |
| <span aria-hidden="true">«</span> | |
| </a> | |
| </li> | |
| <?php else: ?> | |
| <li> | |
| <span aria-hidden="true">«</span> | |
| </li> | |
| <?php endif; ?> | |
| <!-- Numbered page links --> | |
| <?php foreach ($this->pagesInRange as $page): ?> | |
| <?php if ($page != $this->current): ?> | |
| <li> | |
| <a href="<?= $this->url($this->route, [], ['query'=>['page'=>$page]]); ?>"><?= $this->escapeHtml($page); ?></a> | |
| </li> | |
| <?php else: ?> | |
| <li> | |
| <span aria-hidden="true"><b><?= $this->escapeHtml($page); ?></b></span> | |
| </li> | |
| <?php endif; ?> | |
| <?php endforeach; ?> | |
| <!-- Next page link --> | |
| <?php if (isset($this->next)): ?> | |
| <li> | |
| <a href="<?php echo $this->url($this->route, [], ['query'=>['page'=>$this->next]]); ?>" aria-label="Next"> | |
| <span aria-hidden="true">»</span> | |
| </a> | |
| </li> | |
| <?php else: ?> | |
| <li> | |
| <span aria-hidden="true">»</span> | |
| </li> | |
| <?php endif; ?> | |
| </ul> | |
| </nav> | |
| <?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment