MTCurrentPage
現在表示中のページが、検索結果の総ページの何番目にあたるかを出力します。
- 使い方
<$mt:Var name="entries_per_page" value="10"$>
<mt:SetVarBlock name="search_link">
<$mt:CGIPath$><$mt:SearchScript$>?IncludeBlogs=<$mt:BlogID$>
&template_id=<$mt:BuildTemplateID$>
&limit=<$mt:Var name="entries_per_page"$>
&archive_type=Index
&page=
</mt:SetVarBlock>
<$mt:Var name="search_link" strip="" trim="1" encode_html="1" setvar="search_link"$>
<mt:SetVarBlock name="pagination_navigation">
<mt:If name="search_results">
<mt:IfMoreResults>
<li class="page-navigation-list-item page-navigation-prev"><a rel="prev" href="<$mt:NextLink encode_html="1"$>">過去の記事</a></li>
</mt:IfMoreResults>
<li class="page-navigation-list-item page-navigation-current">(<$mt:CurrentPage$> / <$mt:TotalPages$>)</li>
<mt:IfPreviousResults>
<li class="page-navigation-list-item page-navigation-next"><a rel="next" href="<$mt:PreviousLink encode_html="1"$>">新しい記事</a></li>
</mt:IfPreviousResults>
<mt:Else>
<mt:If name="archive_template">
<$mt:ArchiveCount setvar="total_entries"$>
<mt:Else>
<$mt:BlogEntryCount setvar="total_entries"$>
</mt:If>
<mt:If name="total_entries" gt="$entries_per_page">
<li class="page-navigation-list-item page-navigation-prev"><a rel="prev" href="<$mt:Var name="search_link"$>2">過去の記事</a></li>
</mt:If>
</mt:If>
</mt:SetVarBlock>
<mt:If name="pagination_navigation">
<$mt:Var name="pagination_navigation" strip_linefeeds="1" trim="1" setvar="pagination_navigation"$>
<nav class="page-navigation entry-navigation pagination content-nav">
<ul class="pagination-list">
<$mt:Var name="pagination_navigation"$>
</ul>
</nav>
</mt:If>