Skip to content

Instantly share code, notes, and snippets.

@atstyle
Last active January 4, 2016 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atstyle/8573793 to your computer and use it in GitHub Desktop.
Save atstyle/8573793 to your computer and use it in GitHub Desktop.
サムネイルでエントリリスト MTML
<$mt:setvar name="counter" value="0"$>
<mt:Blogs include_blogs="children">
<mt:Entries lastn="0">
<mt:EntryAssets type="image" lastn="1">
<$mt::setvar name="counter" op="++"$>
<mt:SetVarBlock name="EntDate">
<$mt:EntryDate format_name="iso8601"$>
</mt:SetVarBlock>
<mt:SetVarBlock name="EntryLink[$counter]">
<$mt:EntryPermalink$>
</mt:SetVarBlock>
<mt:SetVarBlock name="ImageCode[$counter]"><img src="<$mt:AssetThumbnailURL height="70" square="1"$>" alt="on <$mt:EntryTitle$>" title="on <$mt:EntryTitle$>" /></mt:SetVarBlock>
</mt:EntryAssets>
<mt:SetHashVar name="Compare">
<mt:SetVarBlock name="$EntDate">
<a href="<mt:GetVar name="EntryLink[$counter]">"><mt:GetVar name="ImageCode[$counter]"></a>
</mt:SetVarBlock>
</mt:SetHashVar>
</mt:Entries>
</mt:Blogs>
<mt:Setvar name="CountB" value="0">
<mt:If name="counter" ge="1">
<ul>
<mt:Loop name="Compare" sort_by="key reverse">
<mt:If name="CountB" lt="2">
<mt:Setvar name="CountB" op="++">
<li>
<mt:GetVar name="__value__">
</li>
</mt:If>
</mt:Loop>
</ul>
</mt:If>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment