You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2011/11/11 05:55:01 UTC

svn commit: r1200738 - /sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp

Author: cziegeler
Date: Fri Nov 11 04:55:01 2011
New Revision: 1200738

URL: http://svn.apache.org/viewvc?rev=1200738&view=rev
Log:
Exclude non photo files

Modified:
    sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp

Modified: sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp?rev=1200738&r1=1200737&r2=1200738&view=diff
==============================================================================
--- sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp (original)
+++ sling/trunk/samples/slingshot/src/main/resources/SLING-INF/content/libs/slingshot/Tag/html.jsp Fri Nov 11 04:55:01 2011
@@ -21,6 +21,7 @@
                 org.apache.sling.api.resource.ResourceUtil,
                 org.apache.sling.api.resource.ValueMap,
                 org.apache.sling.api.request.ResponseUtil,
+                org.apache.sling.sample.slingshot.Constants,
                 java.util.Iterator"%><%
 %><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0" %><%
 %><sling:defineObjects/><%
@@ -39,9 +40,12 @@
     final Iterator<Resource> fi = resolver.findResources("SELECT * FROM nt:file WHERE jcr:path LIKE '/slingshot/albums/%' AND slingshot:tags='" + name + "'", "sql");
     while ( fi.hasNext()) {
         final Resource current = fi.next();
-        %>
+        if ( current.isResourceType(Constants.RESOURCETYPE_PHOTO) 
+                && Constants.includeAsMedia(current)) {
+          %>
         <sling:include resource="<%= current %>" resourceType="slingshot/Photo" replaceSelectors="main"/>
-        <%
+          <%
+        }
     }
 %>
 </div>