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 2018/05/11 20:25:39 UTC

[sling-whiteboard] branch master updated (ac42677 -> 5ebdd9e)

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git.


    from ac42677  Enabling Sling Rewriter
     new 5e4af48  Fixing an issue when there was more than one repeating field
     new eae3a35  Deprecating some unneeded code and adding rewrite configuration support
     new 5ebdd9e  Adding rewriter classes and fixing the template / config editor

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../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 ---
 .../sling/cms/core/rewriter/HTML5Serializer.java   | 159 ++++++++++++++++++++
 ...rmerConfig.java => Html5SerializerFactory.java} |  32 ++--
 .../core/rewriter/ReferenceMappingTransformer.java |  21 ++-
 .../ReferenceMappingTransformerConfig.java         |   4 -
 .../ReferenceMappingTransformerFactory.java        |   7 +-
 cms/ui/src/main/frontend/src/js/scripts.js         |   2 +-
 .../src/main/resources/jcr_root/conf/global.json   | 167 +++++++--------------
 .../sling-cms/components/cms/pagetemplate.json     |   4 -
 .../config => rewriterconfig}/edit.json            |  22 +--
 .../rewriterconfig.jsp}                            |  23 ++-
 .../libs/sling-cms/components/cms/siteconfig.json  |   2 +-
 .../components/cms/siteconfig/config.json          |   3 -
 .../components/cms/siteconfig/config/edit.json     |  19 ---
 .../components/cms/siteconfig/siteconfig.jsp       |   8 +
 .../config/config.jsp}                             |   0
 .../config}/edit.json                              |   0
 .../cms/templateeditor/templateeditor.jsp          |   2 +-
 22 files changed, 302 insertions(+), 243 deletions(-)
 delete mode 100644 cms/core/src/main/java/org/apache/sling/cms/core/models/Parameter.java
 create mode 100644 cms/core/src/main/java/org/apache/sling/cms/core/rewriter/HTML5Serializer.java
 copy cms/core/src/main/java/org/apache/sling/cms/core/rewriter/{ReferenceMappingTransformerConfig.java => Html5SerializerFactory.java} (50%)
 delete mode 100644 cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/pagetemplate.json
 copy cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/{fileeditorconfig/config => rewriterconfig}/edit.json (59%)
 rename cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/{siteconfig/config/config.jsp => rewriterconfig/rewriterconfig.jsp} (73%)
 delete mode 100644 cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config.json
 delete mode 100644 cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/siteconfig/config/edit.json
 rename cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/{pagetemplate/pagetemplate.jsp => templateeditor/config/config.jsp} (100%)
 rename cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/{pagetemplate => templateeditor/config}/edit.json (100%)

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

[sling-whiteboard] 03/03: Adding rewriter classes and fixing the template / config editor

Posted by dk...@apache.org.
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 5ebdd9e1cb5d178173a173cdfcbb98feb77f8221
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri May 11 16:25:33 2018 -0400

    Adding rewriter classes and fixing the template / config editor
---
 .../sling/cms/core/rewriter/HTML5Serializer.java   | 159 +++++++++++++++++++++
 .../cms/core/rewriter/Html5SerializerFactory.java  |  44 ++++++
 .../core/rewriter/ReferenceMappingTransformer.java |   7 +-
 .../components/cms/rewriterconfig/edit.json        |  25 ++++
 .../rewriterconfig.jsp}                            |  27 ++--
 .../{template => templateeditor}/config/config.jsp |   0
 .../{template => templateeditor}/config/edit.json  |   0
 .../templateeditor.jsp}                            |   2 +-
 8 files changed, 250 insertions(+), 14 deletions(-)

diff --git a/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/HTML5Serializer.java b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/HTML5Serializer.java
new file mode 100644
index 0000000..67062f5
--- /dev/null
+++ b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/HTML5Serializer.java
@@ -0,0 +1,159 @@
+/*
+ * 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.rewriter;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashSet;
+import java.util.Set;
+
+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.Serializer;
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+/**
+ * Serializer for writing HTML5 compliant markup
+ *
+ */
+public class HTML5Serializer implements Serializer {
+
+	private static final int CHAR_EQ = 61;
+
+	private static final int CHAR_GT = 62;
+
+	private static final int CHAR_SP = 32;
+
+	private static final int CHAR_LT = 60;
+
+	private final Set<String> emptyTags = new HashSet<String>() {
+		private static final long serialVersionUID = 1L;
+		{
+			add("br");
+			add("area");
+			add("link");
+			add("img");
+			add("param");
+			add("hr");
+			add("input");
+			add("col");
+			add("base");
+			add("meta");
+		}
+	};
+
+	private PrintWriter writer;
+
+	private ConfigurationResourceResolver resolver;
+
+	private Resource rewriteConfig;
+
+	public HTML5Serializer(ConfigurationResourceResolver resolver) {
+		this.resolver = resolver;
+	}
+
+	public void characters(char buffer[], int offset, int length) throws SAXException {
+		if (length == 0) {
+			writer.flush();
+		} else {
+			writer.write(buffer, offset, length);
+		}
+	}
+
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void endDocument() throws SAXException {
+		writer.flush();
+	}
+
+	public void endElement(String uri, String localName, String name) throws SAXException {
+		if (!emptyTags.contains(localName)) {
+			writer.write("</");
+			writer.write(localName);
+			writer.write(CHAR_GT);
+		}
+	}
+
+	public void endPrefixMapping(String s) throws SAXException {
+	}
+
+	public void ignorableWhitespace(char ac[], int i, int j) throws SAXException {
+	}
+
+	@Override
+	public void init(ProcessingContext context, ProcessingComponentConfiguration config) throws IOException {
+		if (context.getWriter() == null) {
+			throw new IllegalArgumentException("Failed to initialize HTML5Serializer, null writer specified!");
+		} else {
+			writer = context.getWriter();
+			rewriteConfig = resolver.getResource(context.getRequest().getResource(), "site", "rewrite");
+			return;
+		}
+	}
+
+	public void processingInstruction(String s, String s1) throws SAXException {
+	}
+
+	public void setDocumentLocator(Locator locator1) {
+	}
+
+	public void skippedEntity(String s) throws SAXException {
+	}
+
+	public void startDocument() throws SAXException {
+		writer.println(rewriteConfig.getValueMap().get("doctype", String.class));
+	}
+
+	public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException {
+		boolean endSlash = false;
+		writer.write(CHAR_LT);
+		writer.write(localName);
+
+		for (int i = 0; i < atts.getLength(); i++) {
+			if ("endSlash".equals(atts.getQName(i))) {
+				endSlash = true;
+				continue;
+			}
+			writer.write(CHAR_SP);
+			writer.write(atts.getLocalName(i));
+			String value = atts.getValue(i);
+			if (value == null) {
+				continue;
+			}
+			writer.write(CHAR_EQ);
+			writer.write('"');
+			writer.write(value);
+			writer.write('"');
+		}
+
+		if (endSlash) {
+			writer.write("/");
+		}
+		writer.write(CHAR_GT);
+	}
+
+	public void startPrefixMapping(String s, String s1) throws SAXException {
+	}
+}
diff --git a/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/Html5SerializerFactory.java b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/Html5SerializerFactory.java
new file mode 100644
index 0000000..db8cdef
--- /dev/null
+++ b/cms/core/src/main/java/org/apache/sling/cms/core/rewriter/Html5SerializerFactory.java
@@ -0,0 +1,44 @@
+/*
+ * 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.rewriter;
+
+import org.apache.sling.caconfig.resource.ConfigurationResourceResolver;
+import org.apache.sling.rewriter.Serializer;
+import org.apache.sling.rewriter.SerializerFactory;
+import org.osgi.framework.Constants;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+/**
+ * This sax serializer serializes HTML5 Compliant Markup
+ */
+@Component(service = SerializerFactory.class, property = { Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
+		"pipeline.type=html5-serializer" })
+public class Html5SerializerFactory implements SerializerFactory {
+
+	@Reference
+	private ConfigurationResourceResolver resolver;
+
+	/**
+	 * @see org.apache.sling.rewriter.SerializerFactory#createSerializer()
+	 */
+	@Override
+	public Serializer createSerializer() {
+		return new HTML5Serializer(resolver);
+	}
+
+}
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 4438628..aeb4614 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
@@ -22,6 +22,7 @@ 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.cms.CMSConstants;
 import org.apache.sling.rewriter.ProcessingComponentConfiguration;
 import org.apache.sling.rewriter.ProcessingContext;
 import org.apache.sling.rewriter.Transformer;
@@ -145,7 +146,11 @@ 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) {
+
+		// make sure that the configuration is specified and that we're not currently in
+		// edit mode
+		if (config != null && config.enabledPaths() != null
+				&& !"true".equals(slingRequest.getAttribute(CMSConstants.ATTR_EDIT_ENABLED))) {
 			for (String enabledPath : config.enabledPaths()) {
 				if (slingRequest.getResource().getPath().startsWith(enabledPath)) {
 					enabled = true;
diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/rewriterconfig/edit.json b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/rewriterconfig/edit.json
new file mode 100644
index 0000000..9f296f1
--- /dev/null
+++ b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/rewriterconfig/edit.json
@@ -0,0 +1,25 @@
+ {
+	"jcr:primaryType": "nt:unstructured",
+	"sling:resourceType": "sling-cms/components/editor/slingform",
+	"button": "Save Rewrite Config",
+	"fields": {
+		"jcr:primaryType": "nt:unstructured",
+		"sling:resourceType": "sling-cms/components/general/container",
+		"doctype": {
+			"jcr:primaryType": "nt:unstructured",
+			"sling:resourceType": "sling-cms/components/editor/fields/text",
+			"label": "Doctype",
+			"name": "doctype",
+			"type": "nt:unstructured",
+			"required": true
+		},
+		"attributes": {
+			"jcr:primaryType": "nt:unstructured",
+			"sling:resourceType": "sling-cms/components/editor/fields/repeating",
+			"label": "Rewritten Attributes",
+			"name": "attributes",
+			"type": "text",
+			"required": true
+		}
+	}
+}
\ No newline at end of file
diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/rewriterconfig/rewriterconfig.jsp
similarity index 61%
copy from cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp
copy to cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/rewriterconfig/rewriterconfig.jsp
index 138a080..0e5a4c4 100644
--- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp
+++ b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/rewriterconfig/rewriterconfig.jsp
@@ -17,15 +17,18 @@
  * under the License.
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
- 
-<a href="/cms/config/edit.html${slingRequest.requestPathInfo.suffixResource.parent.parent.path}">
-	&lt; Site Configuration
-</a>
- <br/>
- <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/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
+<h3>Rewrite Configuration</h3>
+<dl>
+	<dt>Doctype</dt>
+	<dd>
+		<sling:encode value="${resource.valueMap.doctype}" mode="HTML" />
+	</dd>
+	<dt>Rewritten Attributes</dt>
+	<dd>
+		<ul>
+			<c:forEach var="attribute" items="${resource.valueMap.attributes}">
+				<sling:encode value="${attribute}" mode="HTML" />
+			</c:forEach>
+		</ul>
+	</dd>
+</dl>
\ No newline at end of file
diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/config/config.jsp b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/config/config.jsp
similarity index 100%
rename from cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/config/config.jsp
rename to cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/config/config.jsp
diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/config/edit.json b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/config/edit.json
similarity index 100%
rename from cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/config/edit.json
rename to cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/config/edit.json
diff --git a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp
similarity index 91%
rename from cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp
rename to cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.jsp
index 138a080..dc281ed 100644
--- a/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/template/template.jsp
+++ b/cms/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/templateeditor/templateeditor.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/template/config" />
+<sling:include path="${slingRequest.requestPathInfo.suffix}" resourceType="sling-cms/components/cms/templateeditor/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
dklco@apache.org.

[sling-whiteboard] 02/03: Deprecating some unneeded code and adding rewrite configuration support

Posted by dk...@apache.org.
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 <dk...@apache.org>
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
dklco@apache.org.

[sling-whiteboard] 01/03: Fixing an issue when there was more than one repeating field

Posted by dk...@apache.org.
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 5e4af4833908cce6a71ff5981155bebb9f8b6640
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri May 11 15:29:25 2018 -0400

    Fixing an issue when there was more than one repeating field
---
 cms/ui/src/main/frontend/src/js/scripts.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cms/ui/src/main/frontend/src/js/scripts.js b/cms/ui/src/main/frontend/src/js/scripts.js
index 970c6a6..13c65ed 100644
--- a/cms/ui/src/main/frontend/src/js/scripts.js
+++ b/cms/ui/src/main/frontend/src/js/scripts.js
@@ -292,7 +292,7 @@ Sling.CMS = {
 				$rep.find('.repeating__add').click(function(){
 					var $div = $('<div/>').html($rep.find('.repeating__template').html());
 					Sling.CMS.decorate($div);
-					$('.repeating__container').append($div);
+					$rep.find('.repeating__container').append($div);
 					return false;
 				});
 			});

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