You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2018/04/17 15:04:30 UTC
[sling-org-apache-sling-scripting-sightly-testing-content] 01/01:
SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions
This is an automated email from the ASF dual-hosted git repository.
radu pushed a commit to branch issue/SLING-7589
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing-content.git
commit 17854487c4c4ccac34c5178630581a45fbf9f471
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Apr 17 17:03:27 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.