<?php   if ( $this->pageCount && count( $this->pagesInRange ) > 1 ) {
            $previous = array( 'class' => 'previous', 'text' => '&lt; '. $this->translate( '#previous#' ) );
            $next     = array( 'class' => 'next', 'text' => $this->translate( '#next#' ) .' &gt;' );

            if ( isset( $this->previous ) ) {
                $previous['text'] = '<a href="'
                                  . $this->url( array( 'page' => $this->previous ) )
                                  . '">'. $previous['text'] .'</a>';
            } else {
                $previous['text']  = '<a>'.$previous['text'].'</a>';
                $previous['class'].= ' disabled';
            }

            if ( isset( $this->next ) ) {
                $next['text'] = '<a href="'
                              . $this->url( array( 'page' => $this->next ) )
                              . '">'. $next['text'] .'</a>';
            } else {
                $next['text']  = '<a>'.$next['text'].'</a>';
                $next['class'].= ' .disabled';
            } ?>
<ul class="pagination">
    <li class="<?php echo $previous['class']; ?>"><?php echo $previous['text']; ?></li>

<?php foreach ( $this->pagesInRange as $page ) {
                if ( $page != $this->current ) { ?>
    <li><a href="<?php echo $this->url( array( 'page' => $page ) ); ?>"><?php echo $page; ?></a></li>
<?php           } else { ?>
    <li class="active"><a><?php echo $page; ?></a></li>
<?php           }
            } ?>

    <li class="<?php echo $next['class']; ?>"><?php echo $next['text']; ?></li>
</ul>
<?php   } ?>