You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/09/05 13:44:18 UTC
[sling-org-apache-sling-app-cms] 02/03: Fixing the query to find
the policy options
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
commit b5746adeffb2921bc64df3ef541a718f6d8dd3bc
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Sep 5 09:43:42 2019 -0400
Fixing the query to find the policy options
---
.../libs/sling-cms/components/caconfig/scripts/policyOptions.jsp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/scripts/policyOptions.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/scripts/policyOptions.jsp
index 7bf8257..a0bd508 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/scripts/policyOptions.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/scripts/policyOptions.jsp
@@ -18,10 +18,8 @@
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
<option value="">Select Policy</option>
-<sling:getParent var="parent" resource="${slingRequest.requestPathInfo.suffixResource}" level="2" />
-${parent.path}
+<sling:getParent var="parent" resource="${slingRequest.requestPathInfo.suffixResource}" level="5" />
<c:set var="query" value="SELECT * FROM [nt:unstructured] WHERE [sling:resourceType] = 'sling-cms/components/caconfig/policy' AND ISDESCENDANTNODE([${parent.path}]) ORDER BY [jcr:title]" />
-${query}
<c:forEach var="policy" items="${sling:findResources(resourceResolver,query,'JCR-SQL2')}">
<option value="${policy.path}" ${policy.path == editProperties.policyPath ? 'selected' : ''}><sling:encode value="${policy.valueMap['jcr:title']}" mode="HTML" /></option>
</c:forEach>
\ No newline at end of file