Skip to content

Instantly share code, notes, and snippets.

@iamtchelo
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save iamtchelo/9abbbbbd73d7090a9316 to your computer and use it in GitHub Desktop.

Select an option

Save iamtchelo/9abbbbbd73d7090a9316 to your computer and use it in GitHub Desktop.

Revisions

  1. iamtchelo revised this gist Sep 19, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion paginator.phtml
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@
    <?php endif; ?>
    <?php endforeach; ?>

    <!-- Previous page link -->
    <!-- Next page link -->
    <?php if (isset($this->next)): ?>
    <li><a href="<?php echo $this->url($this->route, array('controller' => $this->controller, 'page' => $this->next)); ?>">&raquo;</a></li>
    <?php else: ?>
  2. iamtchelo created this gist Sep 19, 2014.
    27 changes: 27 additions & 0 deletions paginator.phtml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    <?php if ($this->pageCount): ?>
    <ul class="pagination">

    <!-- Previous page link -->
    <?php if (isset($this->previous)): ?>
    <li><a href="<?php echo $this->url($this->route, array('controller' => $this->controller, 'page' => $this->previous)); ?>">&laquo;</a></li>
    <?php else: ?>
    <li class="disabled"><a>&laquo;</a></li>
    <?php endif; ?>

    <?php foreach ($this->pagesInRange as $page): ?>
    <?php if ($page != $this->current): ?>
    <li><a href="<?php echo $this->url($this->route, array('controller' => $this->controller, 'page' => $page)); ?>"><?php echo $page ?></a></li>
    <?php else: ?>
    <li class="active"><a href="<?php echo $this->url($this->route, array('controller' => $this->controller, 'page' => $page)); ?>"><?php echo $page ?></a></li>
    <?php endif; ?>
    <?php endforeach; ?>

    <!-- Previous page link -->
    <?php if (isset($this->next)): ?>
    <li><a href="<?php echo $this->url($this->route, array('controller' => $this->controller, 'page' => $this->next)); ?>">&raquo;</a></li>
    <?php else: ?>
    <li class="disabled"><a>&raquo;</a></li>
    <?php endif; ?>

    </ul>
    <?php endif; ?>