- 2008年9月 2日 23:26
- Blogのお仕事 | Movable Type
テンプレートカスタマイズの覚書 ..._〆(゚▽゚*) メモメモ
『カテゴリーアーカイブテンプレートのページ分割』
【前提条件】
1.Movable Type をPHP化
2.ダイナミックパブリッシングでは実行できないので注意
【カスタマイズ手順】
1.プラグインのダウンロード
MT Extensions から MTPaginate をダウンロード
2.プラグインのインストール
・ダウンロードしたファイルを解凍後、以下のディレクトリ構成になるように pluginsディレクトリにアップロード
plugins/MTPaginate/lib/MTPaginate.pm
plugins/MTPaginate/MTPaginate.pl
・Movable Type管理画面でシステムのプラグインに MTPaginate1.28 が表示されれば正常にインストール終了
3.テンプレートの修正
・使用テンプレート「mt.Vicuna 2.2.0 for MT4.2」
・デザイン → テンプレート → アーカイブテンプレート → ブログ記事リスト(カテゴリー)
4.「ブログ記事リスト(カテゴリー)」テンプレートに以下の太字の部分を追記
参考:<MTPaginateContent max_sections="10">の「sections="10"」は、1ページに表示する記事数。
この場合、1ページに"10"の記事を表示するように指定。
・
・
・
<body class="category double">
<$MTInclude module="ヘッダー"$>
<div id="content">
<div id="main">
<$MTInclude module="パンくずリスト"$>
<h1><$MTGetVar name="page_title"$></h1>
<MTPaginate>
<MTPaginateContent max_sections="10">
<MTEntries>
<$MTEntryTrackbackData$>
<$MTInclude module="ブログ記事の概要"$>
<$MTPaginateSectionBreak$>
</MTEntries>
</MTPaginateContent>
<MTPaginateIfMultiplePages>
<p class="paginate">
<MTPaginateIfPreviousPage_>
<a href="<$MTPaginatePreviousPageLink$>"><</a>
</MTPaginateIfPreviousPage_>
<$MTPaginateNavigator style="links" format_all="All pages" place_all="after" separator=" | ">
<MTPaginateIfNextPage_>
<a href="<$MTPaginateNextPageLink$>">></a>
</MTPaginateIfNextPage_>
</p>
</MTPaginateIfMultiplePages>
</MTPaginate>
<$MTInclude module="アーカイブページへのリンク"$>
<$MTInclude module="パンくずリスト"$>
</div>
<!-- end div#main -->
・
・
・
5.テンプレートを保存後、再構築。
- Newer: アーカイブテンプレートのページ分割(月別アーカイブ)
- Older: テンプレートをアップグレード
Comments:0
Trackbacks:0
- TrackBack URL for this entry
- http://kingo-web.com/mt-tb.cgi/114
- Listed below are links to weblogs that reference
- アーカイブテンプレートのページ分割(カテゴリーアーカイブ) from KINGO WEBlog