Changeset 2360
- Timestamp:
- 05/16/08 09:47:08 (21 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-38/lib/MT/Template/ContextHandlers.pm
r2358 r2360 15685 15685 =head2 IfMoreResults 15686 15686 15687 =for tags pagination 15687 A conditional tag used to test whether the requested content has more 15688 to show than currently appearing in the page. 15688 15689 15689 15690 =cut … … 15701 15702 =head2 IfPreviousResults 15702 15703 15703 =for tags pagination 15704 A conditional tag used to test whether the requested content has previous 15705 page. 15704 15706 15705 15707 =cut … … 15714 15716 =head2 PagerBlock 15715 15717 15716 =for tags pagination 15718 A block tag iterates from 1 to the number of the last page in the search 15719 result. For example, if the limit was 10 and the number of results is 75, 15720 the tag loops from 1 through 8. 15721 15722 The page number is set to __value__ standard variable in each iteration. 15723 15724 The tag also sets __odd__, __even__, __first__, __last__ and __counter__ 15725 standard variables. 15726 15727 =back 15728 15729 B<Example:> 15730 15731 M 15732 <MTPagerBlock> 15733 <MTIfCurrentPage>o<MTElse><a href="<MTPagerLink>">o</a></MTIfCurrentPage> 15734 </MTPagerBlock> 15735 vable Type 15736 15737 produces: 15738 15739 "Mooooooooovable Type" where each "o" is a link to the page. 15717 15740 15718 15741 =cut … … 15756 15779 =head2 IfCurrentPage 15757 15780 15758 =for tags pagination 15781 A conditional tag returns true if the current page in the context of 15782 PagerBlock is the current page that is being rendered. 15783 The tag must be used in the context of PagerBlock. 15759 15784 15760 15785 =cut … … 15767 15792 =head2 PagerLink 15768 15793 15769 =for tags pagination 15794 A function tag returns the URL points to the page in the context of 15795 PagerBlock. The tag can only be used in the context of PagerBlock. 15770 15796 15771 15797 =cut … … 15800 15826 =head2 CurrentPage 15801 15827 15802 =for tags pagination 15828 A function tag returns a number represents the number of current page. 15829 The number starts from 1. 15803 15830 15804 15831 =cut … … 15815 15842 =head2 TotalPages 15816 15843 15817 =for tags pagination 15844 A function tag returns a number represents the total number of pages 15845 in the current search context. The number starts from 1. 15818 15846 15819 15847 =cut … … 15832 15860 =head2 PreviousLink 15833 15861 15834 =for tags pagination 15862 A function tag returns the URL points to the previous page of 15863 the current page that is being rendered. 15835 15864 15836 15865 =cut … … 15855 15884 =head2 NextLink 15856 15885 15857 =for tags pagination 15886 A function tag returns the URL points to the next page of the current page 15887 that is being rendered. 15858 15888 15859 15889 =cut
