public function render($return_output = false) {

        // get some properties of the class
        $this->get_page();

        // if there is a single page, or no pages at all, don't display anything
        if ($this->_properties['total_pages'] <= 1) return '';

        // start building output
        $output = '<div class="Zebra_Pagination"><ul' . ($this->_properties['css_classes']['list'] != '' ? ' class="' . trim($this->_properties['css_classes']['list']) . '"' : '') . '>';

        // if we're showing records in reverse order
        if ($this->_properties['reverse']) {

            // if "next page" and "previous page" links are to be shown to the left of the links to individual pages
            if ($this->_properties['navigation_position'] == 'left')

                // first show next/previous and then page links
                $output .= $this->_show_next() . $this->_show_previous() . $this->_show_pages();

            // if "next page" and "previous page" links are to be shown to the right of the links to individual pages
            elseif ($this->_properties['navigation_position'] == 'right')

                $output .= $this->_show_pages() . $this->_show_next() . $this->_show_previous();

            // if "next page" and "previous page" links are to be shown on the outside of the links to individual pages
            else $output .= $this->_show_next() . $this->_show_pages() . $this->_show_previous();

        // if we're showing records in natural order
        } else {

            // if "next page" and "previous page" links are to be shown to the left of the links to individual pages
            if ($this->_properties['navigation_position'] == 'left')

                // first show next/previous and then page links
                $output .= $this->_show_previous() . $this->_show_next() . $this->_show_pages();

            // if "next page" and "previous page" links are to be shown to the right of the links to individual pages
            elseif ($this->_properties['navigation_position'] == 'right')

                $output .= $this->_show_pages() . $this->_show_previous() . $this->_show_next();

            // if "next page" and "previous page" links are to be shown on the outside of the links to individual pages
            else $output .= $this->_show_previous() . $this->_show_pages() . $this->_show_next();

        }

        // finish generating the output
        $output .= '</ul></div>';

        // if $return_output is TRUE
        // return the generated content
        if ($return_output) return $output;

        // if script gets this far, print generated content to the screen
        echo $output;

    }
public function render($return_output = false) {

        // get some properties of the class
        $this->get_page();

        // if there is a single page, or no pages at all, don't display anything
        if ($this->_properties['total_pages'] <= 1) return '';

        // start building output
        $output = '<div class="Zebra_Pagination"><ul' . ($this->_properties['css_classes']['list'] != '' ? ' class="' . trim($this->_properties['css_classes']['list']) . '"' : '') . '>';

        // if we're showing records in reverse order
        if ($this->_properties['reverse']) {

            // if "next page" and "previous page" links are to be shown to the left of the links to individual pages
            if ($this->_properties['navigation_position'] == 'left')

                // first show next/previous and then page links
                $output .= $this->_show_next() . $this->_show_previous() . $this->_show_pages();

            // if "next page" and "previous page" links are to be shown to the right of the links to individual pages
            elseif ($this->_properties['navigation_position'] == 'right')

                $output .= $this->_show_pages() . $this->_show_next() . $this->_show_previous();

            // if "next page" and "previous page" links are to be shown on the outside of the links to individual pages
            else $output .= $this->_show_next() . $this->_show_pages() . $this->_show_previous();

        // if we're showing records in natural order
        } else {

            // if "next page" and "previous page" links are to be shown to the left of the links to individual pages
            if ($this->_properties['navigation_position'] == 'left')

                // first show next/previous and then page links
                $output .= $this->_show_previous() . $this->_show_next() . $this->_show_pages();

            // if "next page" and "previous page" links are to be shown to the right of the links to individual pages
            elseif ($this->_properties['navigation_position'] == 'right')

                $output .= $this->_show_pages() . $this->_show_previous() . $this->_show_next();

            // if "next page" and "previous page" links are to be shown on the outside of the links to individual pages
            else $output .= $this->_show_previous() . $this->_show_pages() . $this->_show_next();

        }

        // finish generating the output
        $output .= '</ul></div>';

        // if $return_output is TRUE
        // return the generated content
        if ($return_output) return $output;

        // if script gets this far, print generated content to the screen
        echo $output;

    }
public function render ( $ return_output = false ) { // get some properties of the class $ this -> get_page ( ) ; // if there is a single page, or no pages at all, don't display anything if ( $ this -> _properties [ 'total_pages' ] <= 1 ) return '' ; // start building output $ output = '<div class="Zebra_Pagination"><ul' . ( $ this -> _properties [ 'css_classes' ] [ 'list' ] != '' ? ' class="' . trim ( $ this -> _properties [ 'css_classes' ] [ 'list' ] ) . '"' : '' ) . '>' ; // if we're showing records in reverse order if ( $ this -> _properties [ 'reverse' ] ) { // if "next page" and "previous page" links are to be shown to the left of the links to individual pages if ( $ this -> _properties [ 'navigation_position' ] == 'left' ) // first show next/previous and then page links $ output .= $ this -> _show_next ( ) . $ this -> _show_previous ( ) . $ this -> _show_pages ( ) ; // if "next page" and "previous page" links are to be shown to the right of the links to individual pages elseif ( $ this -> _properties [ 'navigation_position' ] == 'right' ) $ output .= $ this -> _show_pages ( ) . $ this -> _show_next ( ) . $ this -> _show_previous ( ) ; // if "next page" and "previous page" links are to be shown on the outside of the links to individual pages else $ output .= $ this -> _show_next ( ) . $ this -> _show_pages ( ) . $ this -> _show_previous ( ) ; // if we're showing records in natural order } else { // if "next page" and "previous page" links are to be shown to the left of the links to individual pages if ( $ this -> _properties [ 'navigation_position' ] == 'left' ) // first show next/previous and then page links $ output .= $ this -> _show_previous ( ) . $ this -> _show_next ( ) . $ this -> _show_pages ( ) ; // if "next page" and "previous page" links are to be shown to the right of the links to individual pages elseif ( $ this -> _properties [ 'navigation_position' ] == 'right' ) $ output .= $ this -> _show_pages ( ) . $ this -> _show_previous ( ) . $ this -> _show_next ( ) ; // if "next page" and "previous page" links are to be shown on the outside of the links to individual pages else $ output .= $ this -> _show_previous ( ) . $ this -> _show_pages ( ) . $ this -> _show_next ( ) ; } // finish generating the output $ output .= '</ul></div>' ; // if $return_output is TRUE // return the generated content if ( $ return_output ) return $ output ; // if script gets this far, print generated content to the screen echo $ output ; }
Generates the output.

<i>Make sure your script references the CSS file unless you are using {@link http://getbootstrap.com/ Twitter Bootstrap}!</i>

<code>
//  generate output but don't echo it
//  and return it instead
$output = $pagination->render(true);
</code>

@param  boolean     $return_output      (Optional) Setting this argument to TRUE will instruct the script to
return the generated output rather than outputting it to the screen.

Default is FALSE.

@return void
Generates the output .