<?php 
    }
    ?>
    </div>
    
    <?php 
    if ($_ctx->posts->isEnd()) {
        ?>
      <?php 
        $params = $_ctx->post_params;
        $_ctx->pagination = $core->blog->getPosts($params, true);
        unset($params);
        if ($_ctx->pagination->f(0) > $_ctx->posts->count()) {
            ?>
        <p class="pagination"><?php 
            if (!context::PaginationEnd()) {
                ?>
<a href="<?php 
                echo context::global_filter(context::PaginationURL(1), 0, 0, 0, 0, 0, 'PaginationURL');
                ?>
" class="prev">&#171;
        <?php 
                echo __('previous entries');
                ?>
</a> - <?php 
            }
            ?>
        <?php 
            echo __('page');
            ?>
 <?php