Last active
January 4, 2016 05:18
-
-
Save atstyle/8573793 to your computer and use it in GitHub Desktop.
サムネイルでエントリリスト MTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<$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