6.27 パンくずリスト

P.504

パンくずリスト用テンプレートモジュールの作成

「パンくずリスト」テンプレートモジュール

<p class="breadcrumbs">
<a href="<mt:blogURL />">ホーム</a> &#65310;
<mt:if name="datebased_only_archive">
  <mt:archiveTitle />
</mt:if>
<mt:if name="category_archive">
  <mt:unless name="datebased_archive">
    <mt:categoryID setvar="category_id" />
    <mt:parentCategories glue=" &#65310; ">
      <mt:if tag="categoryCount">
        <mt:categoryID setvar="current_category_id" />
        <mt:if name="category_id" ne="$current_category_id">
          <a href="<mt:categoryArchiveLink />"><mt:categoryLabel encode_html="1" /></a>
        <mt:else>
          <mt:categoryLabel encode_html="1" />
        </mt:if>
      <mt:else>
        <mt:categoryLabel encode_html="1" />
      </mt:if>
    </mt:parentCategories>
  <mt:else>
    <mt:parentCategories glue=" &#65310; ">
      <mt:if tag="CategoryCount">
        <a href="<mt:categoryArchiveLink />"><mt:categoryLabel encode_html="1" /></a>
      <mt:else>
        <mt:categoryLabel />
      </mt:if>
    </mt:parentCategories>
  &#65310; <mt:archiveTitle regex_replace="/.*\: /","" />
  </mt:unless>
</mt:if>
<mt:if name="author_archive">
 <mt:archiveTitle />
</mt:if>
<mt:if name="entry_template">
  <mt:setVar name="category_flag" value="0" />
  <mt:parentCategories glue=" &#65310; ">
    <mt:setVar name="category_flag" value="1" />
    <mt:if tag="categoryCount">
      <a href="<mt:categoryArchiveLink />"><mt:categoryLabel /></a>
    <mt:else>
      <mt:categoryLabel />
    </mt:if>
  </mt:parentCategories>
  <mt:if name="category_flag"> &#65310; </mt:if>
  <mt:entryTitle />
</mt:if>
<mt:if name="page_template">
  <mt:pageTitle />
</mt:if>
</p>

P.506

<if tag="entryCategory"> &#65310; </mt:if>

●アーカイブテンプレートの変更

「ブログ記事リスト」「ブログ記事」「ウェブページ」の各アーカイブテンプレート

...前略...
<div id="contents" class="clearfix">
  <div id="main">
  <mt:include module="パンくずリスト" />
...後略...

「カテゴリ別ブログ記事リスト」「月別ブログ記事リスト」「ブログ記事」「ウェブページ」の各アーカイブテンプレート

...前略...
<div id="alpha">
  <div id="alpha-inner">
    <mt:include module="パンくずリスト" />
...後略...

P.507

●スタイルシートの変更

「スタイルシート」インデックステンプレート(サンプルテンプレート)

...前略...
.breadcrumbs {
    margin-bottom: 15px;	←下マージンを設定します
    font-size: 83.3%;	←フォントサイズを設定します
}
...後略...

ユーザーアーカイブでの表示をカスタマイズする

●パンくずリスト用サブテンプレートの変更

「パンくずリスト」テンプレートモジュール

...前略...
<mt:if name="author_archive">
  <mt:if name="datebased_archive">
    <a href="<mt:authorURL />"><mt:authorName /></a> &#65310; <mt:archiveTitle regex_replace="/.*\: /","" />
  <mt:else>
    <mt:archiveTitle />
  </mt:if>
</mt:if>
...後略...

P.508

■ユーザー一覧のウィジェット

●ユーザー一覧

<mt:ifArchiveTypeEnabled archive_type="Author">
<dt class="sidetitle">ユーザー</dt>
<dd class="side">
  <mt:archiveList archive_type="Author">
    <mt:archiveListHeader>
  <ul>
    </mt:archiveListHeader>
    <li class="widget-list-item"><a href="<mt:archiveLink />"><mt:archiveTitle /></a> [<mt:archiveCount />]</li>
    <mt:archiveListFooter>
  </ul>
    </mt:archiveListFooter>
</dd>
    </mt:archiveListFooter>
  </mt:archiveList>
</mt:ifArchiveTypeEnabled>

●月別ユーザー一覧

<mt:ifArchiveTypeEnabled archive_type="Author-Monthly">
  <mt:archiveList archive_type="Author-Monthly">
    <mt:archiveListHeader>
<dt class="sidetitle"><mt:authorDisplayName />: 月別アーカイブ</dt>
<dd class="side">
  <ul>
    </mt:archiveListHeader>
    <li class="widget-list-item"><a href="<mt:archiveLink />"><mt:archiveTitle /></a> [<mt:archiveCount />]</li>
    <mt:archiveListFooter>
  </ul>
    </mt:archiveListFooter>
  </mt:archiveList>
</dd>
</mt:ifArchiveTypeEnabled>

ウェブページアーカイブでの表示をカスタマイズする

P.509

FolderLink.zip

●パンくずリスト用サブテンプレートの変更

「パンくずリスト」テンプレートモジュール

...前略...
<mt:setVar name="folder_flag" value="0" />
<mt:parentFolders glue=" &#65310; ">
  <mt:setVar name="folder_flag" value="1" />
  <mt:folderDescription />
</mt:parentFolders>
<mt:if name="folder_flag"> &#65310; </mt:if>
<mt:pageTitle />
...後略...

P.510

アーカイブインデックスにパンくずリストを表示する

●サンプルテンプレートをカスタマイズする

「アーカイブインデックス」インデックステンプレート(サンプルテンプレート)

...前略...
<div id="contents" class="clearfix">
  <div id="main">
    <p class="breadcrumbs">
      <a href="<mt:blogURL />">ホーム</a> &#65310; アーカイブインデックス
    </p>
...後略...

●デフォルトテンプレートをカスタマイズする

「アーカイブインデックス」インデックステンプレート(デフォルトテンプレート)

...前略...
<div id="alpha">
  <div id="alpha-inner">
    <p class="breadcrumbs">
      <a href="<mt:blogURL />">ホーム</a> &#65310; アーカイブインデックス
    </p>
...後略...

ウェブページ

Powered by Movable Type 4.261

このアーカイブについて

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。