Example #1
0
 /**
  * check and create prev next tag
  *
  * @param object $Pagination
  * @return string
  */
 public static function prev_next(Pagination $Pagination)
 {
     if (!$Pagination instanceof Pagination) {
         return '';
     }
     $return_html = '';
     // check prev
     if ($Pagination->has_previous()) {
         $return_html .= '<link rel="previous" href="' . $Pagination->get_previous_uri() . '" />' . "\n";
     }
     // check next
     if ($Pagination->has_next()) {
         $return_html .= '<link rel="next" href="' . $Pagination->get_next_uri() . '" />' . "\n";
     }
     return $return_html;
 }
Example #2
0
                            <?php 
    if ($paginate->has_prev()) {
        ?>
                                <a class="pull-left" href="<?php 
        echo 'index.php?page=' . $paginate->prev();
        ?>
" aria-label="Previous">
                                    <span aria-hidden="true">Prev</span>
                                </a>
                            <?php 
    }
    ?>
                        </li>
                        <li class="next">
                            <?php 
    if ($paginate->has_next()) {
        ?>
                                <a class="pull-right" href="<?php 
        echo 'index.php?page=' . $paginate->next();
        ?>
" aria-label="Next">
                                    <span aria-hidden="true">Next</span>
                                </a>
                            <?php 
    }
    ?>
                        </li>
                    </ul>
                    <ul class="pagination">
                        <?php 
    for ($index = 1; $index <= $pages; $index++) {