private function _show_previous() {

        $output = '';

        // if "always_show_navigation" is TRUE or
        // if the number of total pages available is greater than the number of selectable pages
        // it means we can show the "previous page" link
        if ($this->_properties['always_show_navigation'] || $this->_properties['total_pages'] > $this->_properties['selectable_pages']) {

            // CSS classes to be applied to the list item, if any
            $css_classes = isset($this->_properties['css_classes']['list_item']) && $this->_properties['css_classes']['list_item'] != '' ? array(trim($this->_properties['css_classes']['list_item'])) : array();

            // if we're on the first page, the link is disabled
            if ($this->_properties['page'] == 1) $css_classes[] = 'disabled';

            // generate markup
            $output = '<li' .

                // add CSS classes to the list item, if necessary
                (!empty($css_classes) ? ' class="' . implode(' ', $css_classes) . '"' : '') . '><a href="' .

                // the href is different if we're on the first page
                ($this->_properties['page'] == 1 ? 'javascript:void(0)' : $this->_build_uri($this->_properties['page'] - 1)) . '"' .

                // add CSS classes to the anchor, if necessary
                (isset($this->_properties['css_classes']['anchor']) && $this->_properties['css_classes']['anchor'] != '' ? ' class="' . trim($this->_properties['css_classes']['anchor']) . '"' : '') .

                // good for SEO
                // http://googlewebmastercentral.blogspot.de/2011/09/pagination-with-relnext-and-relprev.html
                ' rel="prev">' .

                ($this->_properties['reverse'] ? $this->_properties['next'] : $this->_properties['previous']) . '</a></li>';

        }

        // return the resulting string
        return $output;

    }
private function _show_previous() {

        $output = '';

        // if "always_show_navigation" is TRUE or
        // if the number of total pages available is greater than the number of selectable pages
        // it means we can show the "previous page" link
        if ($this->_properties['always_show_navigation'] || $this->_properties['total_pages'] > $this->_properties['selectable_pages']) {

            // CSS classes to be applied to the list item, if any
            $css_classes = isset($this->_properties['css_classes']['list_item']) && $this->_properties['css_classes']['list_item'] != '' ? array(trim($this->_properties['css_classes']['list_item'])) : array();

            // if we're on the first page, the link is disabled
            if ($this->_properties['page'] == 1) $css_classes[] = 'disabled';

            // generate markup
            $output = '<li' .

                // add CSS classes to the list item, if necessary
                (!empty($css_classes) ? ' class="' . implode(' ', $css_classes) . '"' : '') . '><a href="' .

                // the href is different if we're on the first page
                ($this->_properties['page'] == 1 ? 'javascript:void(0)' : $this->_build_uri($this->_properties['page'] - 1)) . '"' .

                // add CSS classes to the anchor, if necessary
                (isset($this->_properties['css_classes']['anchor']) && $this->_properties['css_classes']['anchor'] != '' ? ' class="' . trim($this->_properties['css_classes']['anchor']) . '"' : '') .

                // good for SEO
                // http://googlewebmastercentral.blogspot.de/2011/09/pagination-with-relnext-and-relprev.html
                ' rel="prev">' .

                ($this->_properties['reverse'] ? $this->_properties['next'] : $this->_properties['previous']) . '</a></li>';

        }

        // return the resulting string
        return $output;

    }
private function _show_previous ( ) { $ output = '' ; // if "always_show_navigation" is TRUE or // if the number of total pages available is greater than the number of selectable pages // it means we can show the "previous page" link if ( $ this -> _properties [ 'always_show_navigation' ] || $ this -> _properties [ 'total_pages' ] > $ this -> _properties [ 'selectable_pages' ] ) { // CSS classes to be applied to the list item, if any $ css_classes = isset ( $ this -> _properties [ 'css_classes' ] [ 'list_item' ] ) && $ this -> _properties [ 'css_classes' ] [ 'list_item' ] != '' ? array ( trim ( $ this -> _properties [ 'css_classes' ] [ 'list_item' ] ) ) : array ( ) ; // if we're on the first page, the link is disabled if ( $ this -> _properties [ 'page' ] == 1 ) $ css_classes [ ] = 'disabled' ; // generate markup $ output = '<li' . // add CSS classes to the list item, if necessary ( ! empty ( $ css_classes ) ? ' class="' . implode ( ' ' , $ css_classes ) . '"' : '' ) . '><a href="' . // the href is different if we're on the first page ( $ this -> _properties [ 'page' ] == 1 ? 'javascript:void(0)' : $ this -> _build_uri ( $ this -> _properties [ 'page' ] - 1 ) ) . '"' . // add CSS classes to the anchor, if necessary ( isset ( $ this -> _properties [ 'css_classes' ] [ 'anchor' ] ) && $ this -> _properties [ 'css_classes' ] [ 'anchor' ] != '' ? ' class="' . trim ( $ this -> _properties [ 'css_classes' ] [ 'anchor' ] ) . '"' : '' ) . // good for SEO // http://googlewebmastercentral.blogspot.de/2011/09/pagination-with-relnext-and-relprev.html ' rel="prev">' . ( $ this -> _properties [ 'reverse' ] ? $ this -> _properties [ 'next' ] : $ this -> _properties [ 'previous' ] ) . '</a></li>' ; } // return the resulting string return $ output ; }
Generates the "previous page" link, depending on whether the pagination links are shown in natural or reversed order.
Generates the previous page link depending on whether the pagination links are shown in natural or reversed order .