【MovableType覚書】MovableType.net用パンくずリスト
2026.07.15MovableType
MovableType.net用に、shema.orgに基づいた「パンくずリスト」を作成してみた。
<!-- breadcrumb_list -->
<mt:SetVar name="i" value="1">
<nav class="breadcrumb_list">
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="<mt:WebsiteURL>"><span itemprop="name">ホーム</span></a>
<meta itemprop="position" content="<mt:Var name="i">" />
</li>
<mt:SetVar name="i" op="++">
<mt:IfWebsite>
<mt:if name="page_archive">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="<mt:PagePermalink>"><span itemprop="name"><mt:PageTitle></span></a>
<meta itemprop="position" content="<mt:Var name="i">" />
</li>
<mt:SetVar name="i" op="++">
<mt:Else type="Individual">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="<mt:EntryPermalink>"><span itemprop="name"><mt:EntryTitle></span></a>
<meta itemprop="position" content="<mt:Var name="i">" />
</li>
<mt:SetVar name="i" op="++">
</mt:if>
</mt:IfWebsite>
<mt:IfBlog>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="<mt:BlogRelativeURL>"><span itemprop="name"><mt:BlogName></span></a>
<meta itemprop="position" content="<mt:Var name="i">" />
</li>
<mt:SetVar name="i" op="++">
<mt:if name="page_archive">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="<mt:PagePermalink>"><span itemprop="name"><mt:PageTitle></span></a>
<meta itemprop="position" content="<mt:Var name="i">" />
</li>
<mt:SetVar name="i" op="++">
<mt:Elseif name="category_archive">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="<mt:CategoryArchiveLink>"><span itemprop="name"><mt:CategoryLabel></span></a>
<meta itemprop="position" content="<mt:Var name="i">" />
</li>
<mt:Elseif name="entry_archive">
<mt:If tag="EntryCategory">
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="<mt:CategoryArchiveLink>"><span itemprop="name"><mt:CategoryLabel></span></a>
<meta itemprop="position" content="<mt:Var name="i">" />
</li>
<mt:SetVar name="i" op="++">
</mt:If>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="<mt:EntryPermalink>"><span itemprop="name"><mt:EntryTitle></span></a>
<meta itemprop="position" content="<mt:Var name="i">" />
</li>
</mt:If>
</mt:IfBlog>
</ol>
</nav>