Skip to content

Instantly share code, notes, and snippets.

@meancode
Created April 21, 2011 00:14
Show Gist options
  • Save meancode/933394 to your computer and use it in GitHub Desktop.
Save meancode/933394 to your computer and use it in GitHub Desktop.
Asset Insertion
<mt:Asset id="$asset_id"><mt:if tag="AssetType" eq="image"><MTSetVarBlock name="width" trim="1"><MTAssetProperty property="image_width"></MTSetVarBlock><mt:if name="width" gt="640">
<mt:setvarblock name="href"><mt:AssetThumbnailURL width="640"></mt:setvarblock></mt:if><mt:unless name="href"><mt:setvarblock name="href"><mt:var name="a_href"></mt:setvarblock></mt:unless><mt:var name="form_tag"><div class="article-image" style="text-align: left; width: <mt:var name="img_width">px;<mt:If name="align" eq="left"> float: left; margin-right: 10px;</mt:If><mt:If name="align" eq="right"> float: right; margin-left: 10px;</mt:If><mt:If name="align" eq="center"> margin: 0px auto;</mt:If>"><a rel="lightbox" href="<mt:var name="href">" title="<mt:var name="caption" escape="html"> (click to enlarge)"><mt:var name="img_tag"></a><mt:if var="description" ne=""><p class="credit"><mt:var name="description"></p></mt:if><mt:if var="caption" ne=""><p class="caption"><mt:var name="caption"></p></mt:if></div><mt:if name="enclose"></form></mt:if><mt:else><mt:var name="upload_html"></mt:if></mt:Asset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment