sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [sling-org-apache-sling-scripting-sightly-testing-content] branch master updated: SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions
Date Tue, 24 Apr 2018 07:45:21 GMT
This is an automated email from the ASF dual-hosted git repository.

radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing-content.git


The following commit(s) were added to refs/heads/master by this push:
     new 444d745  SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions
444d745 is described below

commit 444d745a43211f9378816121d16be145cf07dd86
Author: Radu Cotescu <170911+raducotescu@users.noreply.github.com>
AuthorDate: Tue Apr 24 09:45:19 2018 +0200

    SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions
    
    * added test content
---
 .../scripts/syntheticresource/selector.html        | 19 +++++++++++++++++++
 .../syntheticresource/syntheticresource.html       | 22 ++++++++++++++++++++++
 .../syntheticresourcecaller.html                   | 19 +++++++++++++++++++
 src/main/resources/SLING-INF/sightly.json          |  5 +++++
 4 files changed, 65 insertions(+)

diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/selector.html
b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/selector.html
new file mode 100644
index 0000000..c76059c
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/selector.html
@@ -0,0 +1,19 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<span id="synthetic-resource-selector">It works!</span>
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/syntheticresource.html
b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/syntheticresource.html
new file mode 100644
index 0000000..fd30b8f
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/syntheticresource.html
@@ -0,0 +1,22 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<div id="synthetic-resource">
+    <span class="wrapper-text">Testing synthetic resource delegation</span>
+    <div class="wrapper" data-sly-resource="${@ selectors='selector'}"></div>
+</div>
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresourcecaller/syntheticresourcecaller.html
b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresourcecaller/syntheticresourcecaller.html
new file mode 100644
index 0000000..413c010
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresourcecaller/syntheticresourcecaller.html
@@ -0,0 +1,19 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<div id="caller" data-sly-resource="${'/content/lorem-ipsum' @ resourceType='/apps/sightly/scripts/syntheticresource'}"></div>
diff --git a/src/main/resources/SLING-INF/sightly.json b/src/main/resources/SLING-INF/sightly.json
index 6588dcd..0d8ac4b 100644
--- a/src/main/resources/SLING-INF/sightly.json
+++ b/src/main/resources/SLING-INF/sightly.json
@@ -67,5 +67,10 @@
     },
     "resource.with.dots.in.path": {
         "jcr:primaryType": "nt:unstructured"
+    },
+    "synthetic-resource": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "/apps/sightly/scripts/syntheticresourcecaller"
     }
+
 }

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

Mime
View raw message