Last active
January 3, 2016 05:59
-
-
Save daveaiello/8419955 to your computer and use it in GitHub Desktop.
Count and display multiple Entry Assets of the type Flickr photo associated with the current entry. This is Movable Type Markup Language code to be used in conjunction with the SuperAssets For Flickr plugin, which extends the Movable Type Asset Manager.
This file contains hidden or 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:var name="flickr_asset_count" value="0"> | |
<mt:EntryAssets type="flickr_photo"> | |
<mt:var name="flickr_asset_count" op="++" setvar="flickr_asset_count"> | |
</mt:EntryAssets> | |
<mt:Ignore> | |
<!-- Later in the template... --> | |
</mt:Ignore> | |
<mt:Unless name="flickr_asset_count" eq="0"> | |
<div class="asset-list"> | |
<mt:If name="flickr_asset_count" eq="1"> | |
<mt:EntryAssets type="flickr_photo"> | |
<a href="<$mt:FlickrPhotoPage escape="html"$>" target="_blank">View on Flickr</a> | |
</mt:EntryAssets> | |
<mt:Else> | |
<h3>View on Flickr:</h3> | |
<ul> | |
<mt:EntryAssets type="flickr_photo"> | |
<li<mt:If name="__counter__" eq="1"> class="first"</mt:If>><a href="<$mt:FlickrPhotoPage escape="html"$>" target="_blank">Image <$mt:var name="__counter__"$></a></li> | |
</mt:EntryAssets> | |
</ul> | |
</mt:If> | |
</div> | |
</mt:Unless> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment