Forked from jshaw/underscore-template-conditional.js
Created
October 17, 2013 20:40
-
-
Save akotlov/7031830 to your computer and use it in GitHub Desktop.
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
// If URL is available URL link the image | |
// Otherwise just display the image | |
<% if ( instagram_link_url ) { %> <a href="<%= instagram_link_url %>" target="_blank"> <% } %> | |
<img src="<%= url %>" alt="<%= username %>" /> | |
<% if ( instagram_link_url ) { %> </a> <% } %> | |
// Example 2 - Check if formated date | |
<% if (typeof(date) != "undefined") { %> | |
<span class="date"><%= date %></span> | |
<% } %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment