%
isEvent = false
post.tags.data.forEach(function(tag) {
if ( (tag.name == "Events") && (!isEvent) ) {
isEvent = true
}
});
%>
<% if(isEvent && (source == "index") && (event == 2) ) { %>
<% if(post.photos && post.photos.length) { %>
<% classTag = "post-with-image" %>
<% } else { %>
<% classTag = "post-without-image" %>
<% } %>
<% if(source == "index") { %>
<% } else if (isEvent) { %>
<% } else { %>
<% } %>
<% if(post.photos && post.photos.length) { %>
<% } %>
<% } %>