Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($this->previous)):
- $prevUrl = $this->url($this->route,['page' => $this->previous]);
- endif;
- if(isset($this->next)):
- $nextUrl = $this->url($this->route,['page' => $this->next]);
- endif;
- if($this->pageCount):
- ?>
- <ul class="pagination">
- <?php if(isset($prevUrl)):?>
- <li><a href="<?= $prevUrl ?>">«</a></li>
- <?php else:?>
- <li class="disabled"><a>«</a></li>
- <?php endif;?>
- <?php foreach($this->pagesInRange as $page):
- $actUrl = $this->url($this->route,['page' => $page]);
- if($page != $this->current): ?>
- <li><a href="<?= $actUrl ?>"><?= $page ?></a></li>
- <?php else:?>
- <li class="active"><a><?= $page ?></a></li>
- <?php endif;?>
- <?php endforeach;
- if(isset($nextUrl)):
- ?>
- <li><a href="<?= $nextUrl ?>">»</a></li>
- <?php else:?>
- <li class="disabled"><a>»</a></li>
- <?php endif;?>
- </ul>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement