Show
Ignore:
Timestamp:
04/25/08 11:36:53 (19 months ago)
Author:
fumiakiy
Message:

Implemented PHP version of pager related tags. Dynamically published archives can now be pagination-enabled by adding these tags and specify "auto" to limit and offset.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-36/lib/MT/Template/ContextHandlers.pm

    r2062 r2103  
    561561                my $limit = $_[0]->stash('limit'); 
    562562                my $offset = $_[0]->stash('offset'); 
    563                 $limit ? $offset / $limit + 1 : 1 
     563                $limit ? $offset / $limit + 1 : 1; 
    564564            }, 
    565565            TotalPages => sub { 
    566566                my $limit = $_[0]->stash('limit'); 
     567                return 1 unless $limit; 
    567568                my $count = $_[0]->stash('count'); 
    568569                require POSIX;