sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [sling-site] branch master updated: Fixing SLING-7481
Date Thu, 08 Feb 2018 02:15:08 GMT
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-site.git


The following commit(s) were added to refs/heads/master by this push:
     new a2325ae  Fixing SLING-7481
a2325ae is described below

commit a2325ae7e2bb081e83649df2e94d1ff433c73f84
Author: Dan Klco <klcodanr@users.noreply.github.com>
AuthorDate: Wed Feb 7 21:15:03 2018 -0500

    Fixing SLING-7481
---
 .../documentation/bundles/scripting/scripting-jsp.md    | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/main/jbake/content/documentation/bundles/scripting/scripting-jsp.md b/src/main/jbake/content/documentation/bundles/scripting/scripting-jsp.md
index b1c0584..c06f3da 100644
--- a/src/main/jbake/content/documentation/bundles/scripting/scripting-jsp.md
+++ b/src/main/jbake/content/documentation/bundles/scripting/scripting-jsp.md
@@ -140,6 +140,21 @@ otherwise, the third parameter is used as the default when retrieving
the value
 
     <c:set var="content" value="${sling:getValue(properties,'jcr:title',resource.name)}"
/>
 
+### hasChildren
+
+Return true if the specified resource has child resources.
+
+* Returns: `java.lang.Boolean` - True if there are child resource of the specified resource
+* Accepts:
+    * `org.apache.sling.api.resource.Resource` - The resource of which to check for children.
+* Since: 1.3
+
+*Example Usage*
+
+    <c:if test="${sling:hasChildren(resource)">
+        <h1>Do Something</h1>
+    </c:if>
+
 ### listChildren
 
 Method for allowing the invocation of the Sling Resource listChildren method.
@@ -302,8 +317,6 @@ Retrieves resources based on either an absolute path or a relative path
and a ba
 * Attributes
     * base - The base resource under which to retrieve the child resource, will only be considered
if a relative path is specified.
     * path - The path of the resource to retrieve, if relative, the base resource must be
specified.
-    * defaultValue - The default value to return if no value exists for the key. If specified,
this takes precedence over returnClass.
-    * returnClass - The class into which to coerce the returned value.
     * var - The name of the variable to which to save the resource.
 * Since: 1.3
 

-- 
To stop receiving notification emails like this one, please contact
dklco@apache.org.

Mime
View raw message