MT4用のパンくずリストはMTIFを使って設置、来場者がWEBの森で迷わないような工夫がパンくずリストの目的
パンくずリスト。童話の「ヘンゼルとグレーテル」が由来。森の中で迷わないようにパンくずを少しずつちぎりながら歩いたという逸話。CMS利用でページ数が増加するWEBサイト。来場者がWEBサイトの森の中で迷わないような工夫としても、パンくずリストはすぐれている。MT4の<MTIF>というタグを活用するとヘッダモジュール1か所に埋め込むだけでよい。このパンくずリスト設置したのは「遠田.jpブログ」
(…と遠田は書きました(^^;)
MTは3.3xから4.xに変わり<MTIF>というタグが使えるようになった。
そこで、MT4の<MTIF>を使ってパンくずリストを設置した。
使用したタグは以下のとおり。
(ヘッダモジュールの一番下に張り付けるだけ)
1.アーカイブページをサイトマップとしてパンくずに入れた場合
<!-- パンくずリストMT4開始 -->
<MTUnless name="main_index">
■<a href="<$MTBlogURL$>"><$MTBlogName encode_html="1"$></a>
<MTIf name="archive_index">
<$MTGetVar name="page_title"$>
</MTIf>
<MTIf name="system_template">
<$MTGetVar name="page_title"$>
</MTIf>
<MTIf name="datebased_archive">
<a href="<$MTLink template="archive_index"$>">サイトマップ</a>
<$MTGetVar name="page_title"$>
</MTIf>
<MTIfArchiveType archive_type="Author">
<a href="<$MTLink template="archive_index"$>">サイトマップ</a>
<$MTGetVar name="page_title"$>
</MTIfArchiveType>
<MTIfArchiveType archive_type="Category">
<a href="<$MTLink template="archive_index"$>">サイトマップ</a> ›
<MTParentCategories glue=" > ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a>
</MTParentCategories>
</MTIfArchiveType>
<MTIfArchiveType archive_type="Individual">
<a href="<$MTLink template="archive_index"$>">サイトマップ</a> ›
<MTParentCategories glue=" > ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a>
</MTParentCategories>
<a href="<$MTEntryPermalink$>"><$MTGetVar name="page_title"$></a>
</MTIfArchiveType>
</MTUnless>
<!-- パンくずリストMT4ここまで -->
※このパンくずリストは SCREAMOさんの「パンくずリスト for Movable Type 4」を参考にして作成しました。
ありがとうございます>SCREAMOさん
2.アーカイブページをサイトマップに入れないシンプルなパンくずリストの場合
<!-- パンくずリストMT4開始 -->
<MTUnless name="main_index">
■<a href="<$MTBlogURL$>"><$MTBlogName encode_html="1"$></a> ›
<MTIf name="archive_index">
<$MTGetVar name="page_title"$>
</MTIf>
<MTIf name="system_template">
<$MTGetVar name="page_title"$>
</MTIf>
<MTIf name="datebased_archive">
<$MTGetVar name="page_title"$>
</MTIf>
<MTIfArchiveType archive_type="Author">
<$MTGetVar name="page_title"$>
</MTIfArchiveType>
<MTIfArchiveType archive_type="Category">
<MTParentCategories glue=" > ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a> ›
</MTParentCategories>
</MTIfArchiveType>
<MTIfArchiveType archive_type="Individual">
<MTParentCategories glue=" > ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a> ›
</MTParentCategories>
<a href="<$MTEntryPermalink$>"><$MTGetVar name="page_title"$></a> ›
</MTIfArchiveType>
</MTUnless>
<!-- パンくずリストMT4ここまで -->
※パンくず2の設置例はSEMM(semm.jp)






コメント (1)
パンくずリストですか…なるほど。
原理的には樹海を歩くときに、1本1本の木に縄もしくは紐を結んでいき、履歴を辿れるようにする…というものですね。
面白い話をありがとうございました。
投稿者: コロン | 2008年1月14日 17:43
日時: 2008年1月14日 17:43