<% function getName(path) { var split = path.split("/"); return split[split.length-1]; } %> <% if (results.length) { %> Results <% _.each(results,function(result) { %>
<%= getName(result.path) %>
<% }); %> <% } else { %> No results.. <% } %>