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-whiteboard.git
commit eae3a357ad7e6068a45d0e4c49493fce80362302 Author: Dan Klco <[email protected]> AuthorDate: Fri May 11 15:29:53 2018 -0400 Deprecating some unneeded code and adding rewrite configuration support --- .../src/main/provisioning/sling-rewriter.txt | 4 +- cms/builder/src/main/provisioning/sling.txt | 2 +- cms/core/pom.xml | 8 +- .../apache/sling/cms/core/models/Parameter.java | 36 ----- .../apache/sling/cms/core/models/SiteConfig.java | 20 --- .../core/rewriter/ReferenceMappingTransformer.java | 16 +- .../ReferenceMappingTransformerConfig.java | 4 - .../ReferenceMappingTransformerFactory.java | 7 +- .../src/main/resources/jcr_root/conf/global.json | 167 +++++++-------------- .../sling-cms/components/cms/pagetemplate.json | 4 - .../libs/sling-cms/components/cms/siteconfig.json | 2 +- .../components/cms/siteconfig/config.json | 3 - .../components/cms/siteconfig/config/config.jsp | 35 ----- .../components/cms/siteconfig/config/edit.json | 19 --- .../components/cms/siteconfig/siteconfig.jsp | 8 + .../config/config.jsp} | 0 .../{pagetemplate => template/config}/edit.json | 0 .../templateeditor.jsp => template/template.jsp} | 2 +- 18 files changed, 94 insertions(+), 243 deletions(-) diff --git a/cms/builder/src/main/provisioning/sling-rewriter.txt b/cms/builder/src/main/provisioning/sling-rewriter.txt index 7e2bd69..a8bfa32 100644 --- a/cms/builder/src/main/provisioning/sling-rewriter.txt +++ b/cms/builder/src/main/provisioning/sling-rewriter.txt @@ -20,8 +20,8 @@ [feature name=sling-rewriter] [artifacts] - org.apache.sling/org.apache.sling.commons.html/1.0.0 - org.apache.sling/org.apache.sling.rewriter/1.2.2 + org.apache.sling/org.apache.sling.commons.html/1.0.3-SNAPSHOT + org.apache.sling/org.apache.sling.rewriter/1.2.3-SNAPSHOT [:repoinit] create service user sling-rewriter diff --git a/cms/builder/src/main/provisioning/sling.txt b/cms/builder/src/main/provisioning/sling.txt index a47b402..375448a 100644 --- a/cms/builder/src/main/provisioning/sling.txt +++ b/cms/builder/src/main/provisioning/sling.txt @@ -69,7 +69,7 @@ org.apache.felix/org.apache.felix.http.whiteboard/3.0.0 [artifacts startLevel=5] - org.apache.sling/org.apache.sling.starter.startup/1.0.4 + org.apache.sling/org.apache.sling.starter.startup/1.0.5-SNAPSHOT org.apache.sling/org.apache.sling.extensions.webconsolebranding/1.0.2 org.apache.sling/org.apache.sling.extensions.webconsolesecurityprovider/1.0.0 org.apache.felix/org.apache.felix.inventory/1.0.6 diff --git a/cms/core/pom.xml b/cms/core/pom.xml index 7587255..ad3f8c9 100644 --- a/cms/core/pom.xml +++ b/cms/core/pom.xml @@ -9,7 +9,8 @@ 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. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -261,6 +262,11 @@ <groupId>org.apache.geronimo.bundles</groupId> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.apache.sling</groupId> + <artifactId>org.apache.sling.caconfig.api</artifactId> + <version>1.0.0</version> + </dependency> </dependencies> diff --git a/cms/core/src/main/java/org/apache/sling/cms/core/models/Parameter.java b/cms/core/src/main/java/org/apache/sling/cms/core/models/Parameter.java deleted file mode 100644 index b92f938..0000000 --- a/cms/core/src/main/java/org/apache/sling/cms/core/models/Parameter.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ -package org.apache.sling.cms.core.models; - -import javax.inject.Inject; - -import org.apache.sling.api.resource.Resource; -import org.apache.sling.models.annotations.Model; - -/** - * A simple model for representing a parameter in a site config with a key and - * value - */ -@Model(adaptables = Resource.class) -public interface Parameter { - - @Inject - String getKey(); - - @Inject - String getValue(); -} diff --git a/cms/core/src/main/java/org/apache/sling/cms/core/models/SiteConfig.java b/cms/core/src/main/java/org/apache/sling/cms/core/models/SiteConfig.java index a729db9..4a4e699 100644 --- a/cms/core/src/main/java/org/apache/sling/cms/core/models/SiteConfig.java +++ b/cms/core/src/main/java/org/apache/sling/cms/core/models/SiteConfig.java @@ -52,26 +52,6 @@ public class SiteConfig { return CMSUtils.adaptResources(templates, PageTemplate.class); } - /** - * @return the parameters - */ - public List<Parameter> getParameters() { - return CMSUtils.adaptResources(parameters, Parameter.class); - } - - public String getParameterValue(String key) { - String value = null; - if (parameters != null) { - for (Parameter param : getParameters()) { - if (key.equals(param.getKey())) { - value = param.getValue(); - break; - } - } - } - return value; - } - /* * (non-Javadoc) * diff --git a/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformer.java b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformer.java index dd31a3b..4438628 100644 --- a/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformer.java +++ b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformer.java @@ -20,6 +20,8 @@ import java.io.IOException; import org.apache.commons.lang.ArrayUtils; import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.resource.Resource; +import org.apache.sling.caconfig.resource.ConfigurationResourceResolver; import org.apache.sling.rewriter.ProcessingComponentConfiguration; import org.apache.sling.rewriter.ProcessingContext; import org.apache.sling.rewriter.Transformer; @@ -47,8 +49,14 @@ public class ReferenceMappingTransformer implements Transformer { private boolean enabled = false; - public ReferenceMappingTransformer(ReferenceMappingTransformerConfig config) { + private ConfigurationResourceResolver resolver; + + private String[] attributes; + + public ReferenceMappingTransformer(ReferenceMappingTransformerConfig config, + ConfigurationResourceResolver resolver) { this.config = config; + this.resolver = resolver; } @Override @@ -87,7 +95,7 @@ public class ReferenceMappingTransformer implements Transformer { AttributesImpl newAtts = new AttributesImpl(); for (int i = 0; i < atts.getLength(); i++) { String value = null; - if (ArrayUtils.contains(config.mappedAttributes(), atts.getLocalName(i).toLowerCase()) + if (ArrayUtils.contains(attributes, atts.getLocalName(i).toLowerCase()) && atts.getValue(i).startsWith("/")) { log.trace("Updating attribute {}", atts.getLocalName(i)); value = slingRequest.getResourceResolver().map(slingRequest, atts.getValue(i)); @@ -137,13 +145,15 @@ public class ReferenceMappingTransformer implements Transformer { public void init(ProcessingContext context, ProcessingComponentConfiguration cfg) throws IOException { log.trace("init"); slingRequest = context.getRequest(); - if(config != null && config.enabledPaths() != null) { + if (config != null && config.enabledPaths() != null) { for (String enabledPath : config.enabledPaths()) { if (slingRequest.getResource().getPath().startsWith(enabledPath)) { enabled = true; break; } } + Resource configResource = resolver.getResource(slingRequest.getResource(), "site", "rewrite"); + attributes = configResource.getValueMap().get("attributes", String[].class); } } diff --git a/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformerConfig.java b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformerConfig.java index b042414..8d6a576 100644 --- a/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformerConfig.java +++ b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformerConfig.java @@ -25,10 +25,6 @@ import org.osgi.service.metatype.annotations.AttributeDefinition; @ObjectClassDefinition(name = "Reference Mapping Transformer Configuration") public @interface ReferenceMappingTransformerConfig { - @AttributeDefinition(name = "Mapped Attributes", description = "Element attributes which should be mapped", defaultValue = { - "action", "href", "src" }) - String[] mappedAttributes(); - @AttributeDefinition(name = "Enabled Paths", description = "Paths under which this transformer will be enabled", defaultValue = { "/content" }) String[] enabledPaths(); diff --git a/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformerFactory.java b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformerFactory.java index e18482d..ff3a928 100644 --- a/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformerFactory.java +++ b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/ReferenceMappingTransformerFactory.java @@ -16,11 +16,13 @@ */ package org.apache.sling.cms.core.rewriter; +import org.apache.sling.caconfig.resource.ConfigurationResourceResolver; import org.apache.sling.rewriter.Transformer; import org.apache.sling.rewriter.TransformerFactory; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.ConfigurationPolicy; +import org.osgi.service.component.annotations.Reference; import org.osgi.service.metatype.annotations.Designate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -38,6 +40,9 @@ public class ReferenceMappingTransformerFactory implements TransformerFactory { private static final Logger log = LoggerFactory.getLogger(ReferenceMappingTransformerFactory.class); private ReferenceMappingTransformerConfig config; + @Reference + private ConfigurationResourceResolver resolver; + @Activate public void activate(ReferenceMappingTransformerConfig config) { @@ -52,7 +57,7 @@ public class ReferenceMappingTransformerFactory implements TransformerFactory { @Override public Transformer createTransformer() { log.trace("createTransformer"); - return new ReferenceMappingTransformer(config); + return new ReferenceMappingTransformer(config, resolver); } } diff --git a/cms/ui/src/main/resources/jcr_root/conf/global.json b/cms/ui/src/main/resources/jcr_root/conf/global.json index ba6d115..f640745 100644 --- a/cms/ui/src/main/resources/jcr_root/conf/global.json +++ b/cms/ui/src/main/resources/jcr_root/conf/global.json @@ -4,64 +4,6 @@ "jcr:primaryType": "nt:unstructured", "jcr:title": "Global" }, - "site": { - "jcr:primaryType": "sling:Config", - "jcr:title": "Default Site Configuration", - "sling:resourceType": "sling-cms/components/cms/siteconfig", - "templates": { - "jcr:primaryType": "nt:unstructured", - "base-page": { - "jcr:primaryType": "nt:unstructured", - "jcr:title": "Base Page", - "template": "{\r\n \"jcr:primaryType\": \"sling:Page\",\r\n \"jcr:content\": {\r\n \"jcr:primaryType\": \"nt:unstructured\",\r\n \"jcr:title\": \"{{title}}\",\r\n \"sling:template\": \"/conf/global/site/templates/base-page\",\r\n \"sling:resourceType\": \"reference/components/pages/base\",\r\n \"published\": false\r\n }\r\n}", - "availableComponentTypes": [ - "General", - "SlingCMS-ComponentConfig" - ], - "jcr:lastModifiedBy": "admin", - "allowedPaths": [ - "/content/apache-sling-org.*" - ], - "sling:resourceType": "sling-cms/components/cms/pagetemplate", - "fields": { - "jcr:primaryType": "nt:unstructured", - "text": { - "jcr:primaryType": "nt:unstructured", - "required": true, - "name": "title", - "type": "text", - "label": "Title", - "sling:resourceType": "sling-cms/components/editor/fields/text" - }, - "text_1147023191": { - "jcr:primaryType": "nt:unstructured", - "required": true, - "name": ":name", - "type": "text", - "label": "Name", - "sling:resourceType": "sling-cms/components/editor/fields/text" - } - }, - "componentConfigurations": { - "jcr:primaryType": "nt:unstructured", - "componentconfig": { - "jcr:primaryType": "nt:unstructured", - "type": "reference/components/general/columncontrol", - "containerclass": "container", - "columns": [ - "50-50=col-md-6 col-md-6", - "100=col-md-12" - ], - "sling:resourceType": "sling-cms/components/cms/componentconfig" - } - } - } - }, - "jcr:content": { - "jcr:primaryType": "nt:unstructured", - "jcr:title": "Default Site Configuration" - } - }, "files": { "jcr:primaryType": "sling:OrderedFolder", "jcr:content": { @@ -80,7 +22,7 @@ "sling:resourceType": "sling-cms/components/cms/fileeditorconfig", "fields": { "jcr:primaryType": "nt:unstructured", - "text": { + "title": { "jcr:primaryType": "nt:unstructured", "required": false, "name": "jcr:content/jcr:title", @@ -88,7 +30,7 @@ "label": "Title", "sling:resourceType": "sling-cms/components/editor/fields/text" }, - "text_1274324601": { + "jcrmimeType": { "jcr:primaryType": "nt:unstructured", "required": true, "name": "jcr:content/jcr:mimeType", @@ -96,7 +38,7 @@ "label": "MIME Type", "sling:resourceType": "sling-cms/components/editor/fields/text" }, - "text_1001913053": { + "licensing": { "jcr:primaryType": "nt:unstructured", "required": false, "name": "jcr:content/licensing", @@ -110,88 +52,89 @@ "label": "Taxonomy", "sling:resourceType": "sling-cms/components/editor/fields/taxonomy" }, - "hidden": { + "taxonomyTypeHint": { "jcr:primaryType": "nt:unstructured", "name": "jcr:content/sling:taxonomy@TypeHint", "value": "String[]", "sling:resourceType": "sling-cms/components/editor/fields/hidden" }, - "select": { + "published": { "jcr:primaryType": "nt:unstructured", "options": "Yes=true, No=false", "name": "jcr:content/published", "label": "Published", "sling:resourceType": "sling-cms/components/editor/fields/select" }, - "hidden_200038586": { + "publishedTypeHint": { "jcr:primaryType": "nt:unstructured", "name": "jcr:content/published@TypeHint", "value": "Boolean", "sling:resourceType": "sling-cms/components/editor/fields/hidden" } } - }, - "video": { - "jcr:primaryType": "sling:Config", - "jcr:title": "Video File Editor", - "sling:resourceType": "sling-cms/components/cms/fileeditorconfig", + } + } + }, + "site": { + "jcr:primaryType": "sling:Config", + "sling:resourceType": "sling-cms/components/cms/siteconfig", + "jcr:content": { + "jcr:primaryType": "nt:unstructured", + "jcr:title": "Default Site Configuration" + }, + "rewrite": { + "jcr:primaryType": "nt:unstructured", + "doctype": "<!DOCTYPE html>", + "attributes": [ + "action", + "href", + "src" + ] + }, + "templates": { + "jcr:primaryType": "nt:unstructured", + "base-page": { + "jcr:primaryType": "nt:unstructured", + "jcr:title": "Base Page", + "template": "{\r\n \"jcr:primaryType\": \"sling:Page\",\r\n \"jcr:content\": {\r\n \"jcr:primaryType\": \"nt:unstructured\",\r\n \"jcr:title\": \"{{title}}\",\r\n \"sling:template\": \"/conf/global/site/templates/base-page\",\r\n \"sling:resourceType\": \"reference/components/pages/base\",\r\n \"published\": false\r\n }\r\n}", + "availableComponentTypes": [ + "General" + ], + "allowedPaths": [ + "/content/apache/apache-sling-org.*" + ], + "sling:resourceType": "sling-cms/components/cms/pagetemplate", "fields": { "jcr:primaryType": "nt:unstructured", "text": { "jcr:primaryType": "nt:unstructured", - "required": false, - "name": "jcr:content/jcr:title", - "type": "text", - "label": "Video Title", - "sling:resourceType": "sling-cms/components/editor/fields/text" - }, - "text_1274324601": { - "jcr:primaryType": "nt:unstructured", "required": true, - "name": "jcr:content/jcr:mimeType", + "name": "title", "type": "text", - "label": "MIME Type", + "label": "Title", "sling:resourceType": "sling-cms/components/editor/fields/text" }, - "text_1001913053": { + "text_1147023191": { "jcr:primaryType": "nt:unstructured", - "required": false, - "name": "jcr:content/licensing", + "required": true, + "name": ":name", "type": "text", - "label": "Licensing", + "label": "Name", "sling:resourceType": "sling-cms/components/editor/fields/text" - }, - "taxonomy": { - "jcr:primaryType": "nt:unstructured", - "name": "jcr:content/sling:taxonomy", - "label": "Taxonomy", - "sling:resourceType": "sling-cms/components/editor/fields/taxonomy" - }, - "hidden": { - "jcr:primaryType": "nt:unstructured", - "name": "jcr:content/sling:taxonomy@TypeHint", - "value": "String[]", - "sling:resourceType": "sling-cms/components/editor/fields/hidden" - }, - "select": { - "jcr:primaryType": "nt:unstructured", - "options": "Yes=true, No=false", - "name": "jcr:content/published", - "label": "Published", - "sling:resourceType": "sling-cms/components/editor/fields/select" - }, - "hidden_200038586": { - "jcr:primaryType": "nt:unstructured", - "name": "jcr:content/published@TypeHint", - "value": "Boolean", - "sling:resourceType": "sling-cms/components/editor/fields/hidden" } }, - "jcr:content": { + "componentConfigurations": { "jcr:primaryType": "nt:unstructured", - "mimetypes": [ - "video/mp4" - ] + "componentconfig": { + "jcr:primaryType": "nt:unstructured", + "type": "reference/components/general/columncontrol", + "containerclass": "container", + "columns": [ + "50-50=col-md-6 col-md-6", + "100=col-md-12" + ], + "sling:resourceType": "sling-cms/components/cms/componentconfig" + } } } } diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagetemplate.json b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagetemplate.json deleted file mode 100644 index af5bfe9..0000000 --- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagetemplate.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "jcr:primaryType": "sling:Component", - "jcr:title": "Sling CMS - Page Template" -} \ No newline at end of file diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig.json b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig.json index 86f6f1f..beab406 100644 --- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig.json +++ b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig.json @@ -1,5 +1,5 @@ { "jcr:primaryType": "sling:Component", - "jcr:title": "Site Configuration", + "jcr:title": "Sling CMS - Site Configuration", "componentType": "SlingCMS-Config" } \ No newline at end of file diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config.json b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config.json deleted file mode 100644 index 87a0fc2..0000000 --- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "jcr:primaryType": "sling:Component" -} \ No newline at end of file diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config/config.jsp b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config/config.jsp deleted file mode 100644 index cebdd7f..0000000 --- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config/config.jsp +++ /dev/null @@ -1,35 +0,0 @@ -<%-- /* - * 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. - */ --%> - <%@include file="/libs/sling-cms/global.jsp"%> -<h3>Configuration</h3> -<dl> - <dt>Field Editor</dt> - <dd> - <c:choose> - <c:when test="${not empty resource.valueMap.fileeditor}"> - <a href="/cms/file/configureeditor.html${resource.valueMap.fileeditor}"> - Configure File Editor - </a> - </c:when> - <c:otherwise> - Not Defined - </c:otherwise> - </c:choose> - </dd> -</dl> \ No newline at end of file diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config/edit.json b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config/edit.json deleted file mode 100644 index 84e22eb..0000000 --- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config/edit.json +++ /dev/null @@ -1,19 +0,0 @@ - { - "jcr:primaryType": "nt:unstructured", - "sling:resourceType": "sling-cms/components/editor/slingform", - "button": "Save Site Config", - "fields": { - "jcr:primaryType": "nt:unstructured", - "sling:resourceType": "sling-cms/components/general/container", - "fileeditor": { - "jcr:primaryType": "nt:unstructured", - "sling:resourceType": "sling-cms/components/editor/fields/path", - "label": "File Editor", - "name": "fileeditor", - "basePath": "/etc/fileeditors", - "type": "nt:unstructured", - "additionalParams": "AND NAME() <> 'jcr:content' AND ISCHILDNODE([/etc/fileeditors])", - "required": true - } - } -} \ No newline at end of file diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/siteconfig.jsp b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/siteconfig.jsp index 30b9bdd..a0ca814 100644 --- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/siteconfig.jsp +++ b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/siteconfig.jsp @@ -18,4 +18,12 @@ */ --%> <%@include file="/libs/sling-cms/global.jsp"%> + <c:set var="cmsEditEnabled" value="true" scope="request" /> +<sling:call script="/libs/sling-cms/components/editor/scripts/init.jsp" /> + +<sling:include path="${slingRequest.requestPathInfo.suffix}/rewrite" resourceType="sling-cms/components/cms/rewriterconfig" /> + +<sling:call script="/libs/sling-cms/components/editor/scripts/finalize.jsp" /> +<c:set var="cmsEditEnabled" value="false" scope="request" /> + <sling:include path="/mnt/overlay/sling-cms/content/siteconfig/editor" resourceType="sling-cms/components/general/container" replaceSuffix="${slingRequest.requestPathInfo.suffix}" /> \ No newline at end of file diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagetemplate/pagetemplate.jsp b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/config/config.jsp similarity index 100% rename from cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagetemplate/pagetemplate.jsp rename to cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/config/config.jsp diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagetemplate/edit.json b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/config/edit.json similarity index 100% rename from cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagetemplate/edit.json rename to cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/config/edit.json diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp similarity index 91% rename from cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp rename to cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp index 5f4d3c3..138a080 100644 --- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp +++ b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp @@ -25,7 +25,7 @@ <c:set var="cmsEditEnabled" value="true" scope="request" /> <sling:call script="/libs/sling-cms/components/editor/scripts/init.jsp" /> -<sling:include path="${slingRequest.requestPathInfo.suffix}" resourceType="sling-cms/components/cms/pagetemplate" /> +<sling:include path="${slingRequest.requestPathInfo.suffix}" resourceType="sling-cms/components/cms/template/config" /> <sling:call script="/libs/sling-cms/components/editor/scripts/finalize.jsp" /> <c:set var="cmsEditEnabled" value="false" scope="request" /> \ No newline at end of file -- To stop receiving notification emails like this one, please contact [email protected].
