Changeset 2360

Show
Ignore:
Timestamp:
05/16/08 09:47:08 (6 months ago)
Author:
fumiakiy
Message:

Documented pager related tags. BugId:79576

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-38/lib/MT/Template/ContextHandlers.pm

    r2358 r2360  
    1568515685=head2 IfMoreResults 
    1568615686 
    15687 =for tags pagination 
     15687A conditional tag used to test whether the requested content has more 
     15688to show than currently appearing in the page. 
    1568815689 
    1568915690=cut 
     
    1570115702=head2 IfPreviousResults 
    1570215703 
    15703 =for tags pagination 
     15704A conditional tag used to test whether the requested content has previous 
     15705page. 
    1570415706 
    1570515707=cut 
     
    1571415716=head2 PagerBlock 
    1571515717 
    15716 =for tags pagination 
     15718A block tag iterates from 1 to the number of the last page in the search 
     15719result. For example, if the limit was 10 and the number of results is 75, 
     15720the tag loops from 1 through 8.  
     15721 
     15722The page number is set to __value__ standard variable in each iteration.  
     15723 
     15724The tag also sets __odd__, __even__, __first__, __last__ and __counter__ 
     15725standard variables.  
     15726 
     15727=back 
     15728 
     15729B<Example:> 
     15730 
     15731    M 
     15732    <MTPagerBlock> 
     15733      <MTIfCurrentPage>o<MTElse><a href="<MTPagerLink>">o</a></MTIfCurrentPage> 
     15734    </MTPagerBlock> 
     15735    vable Type 
     15736 
     15737produces: 
     15738 
     15739    "Mooooooooovable Type" where each "o" is a link to the page. 
    1571715740 
    1571815741=cut 
     
    1575615779=head2 IfCurrentPage 
    1575715780 
    15758 =for tags pagination 
     15781A conditional tag returns true if the current page in the context of 
     15782PagerBlock is the current page that is being rendered.  
     15783The tag must be used in the context of PagerBlock. 
    1575915784 
    1576015785=cut 
     
    1576715792=head2 PagerLink 
    1576815793 
    15769 =for tags pagination 
     15794A function tag returns the URL points to the page in the context of 
     15795PagerBlock. The tag can only be used in the context of PagerBlock.  
    1577015796 
    1577115797=cut 
     
    1580015826=head2 CurrentPage 
    1580115827 
    15802 =for tags pagination 
     15828A function tag returns a number represents the number of current page. 
     15829The number starts from 1. 
    1580315830 
    1580415831=cut 
     
    1581515842=head2 TotalPages 
    1581615843 
    15817 =for tags pagination 
     15844A function tag returns a number represents the total number of pages 
     15845in the current search context. The number starts from 1.  
    1581815846 
    1581915847=cut 
     
    1583215860=head2 PreviousLink 
    1583315861 
    15834 =for tags pagination 
     15862A function tag returns the URL points to the previous page of  
     15863the current page that is being rendered. 
    1583515864 
    1583615865=cut 
     
    1585515884=head2 NextLink 
    1585615885 
    15857 =for tags pagination 
     15886A function tag returns the URL points to the next page of the current page 
     15887that is being rendered.  
    1585815888 
    1585915889=cut