Dotclear


Ignore:
Timestamp:
12/20/14 15:49:27 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.7
Message:

Nb of post displayed on home page (first page) should not be applied on first pages of other contexts (tags, category, search, …) : fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/public/lib.tpl.context.php

    r2802 r2863  
    216216 
    217217          $nb_posts = $_ctx->pagination->f(0); 
    218           $nb_pages = ceil(($nb_posts - $_ctx->nb_entry_first_page) / $_ctx->nb_entry_per_page + 1); 
     218          if (($GLOBALS['core']->url->type == 'default') || ($GLOBALS['core']->url->type == 'default-page')) { 
     219               $nb_pages = ceil(($nb_posts - $_ctx->nb_entry_first_page) / $_ctx->nb_entry_per_page + 1); 
     220          } else { 
     221               $nb_pages = ceil($nb_posts / $_ctx->nb_entry_per_page); 
     222          } 
    219223 
    220224          return $nb_pages; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map