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 2021/10/09 00:26:30 UTC

[sling-org-apache-sling-app-cms] branch master updated: SLING-10863 - fixing sitemap and filter and cleaning up the conf to they can be added to the sample site

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-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/master by this push:
     new bbea581  SLING-10863 - fixing sitemap and filter and cleaning up the conf to they can be added to the sample site
bbea581 is described below

commit bbea581ca64c164caac0d1135b303b02cfaf9ed0
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Fri Oct 8 20:26:20 2021 -0400

    SLING-10863 - fixing sitemap and filter and cleaning up the conf to they can be added to the sample site
---
 api/src/test/resources/content.json                |   4 +-
 .../core/insights/impl/PageInsightRequestImpl.java |  50 +-
 .../internal/models/PageInsightRequestModel.java   |  38 ++
 reference/bnd.bnd                                  |   2 +-
 .../reference/components/general/rss/rss.xml.jsp   | 114 ++--
 .../components/general/sitemap/sitemap.xml.jsp     |   2 +-
 .../src/main/resources/jcr_root/conf/asf.json      | 117 ++++
 .../main/resources/jcr_root/content/apache.json    |  82 +--
 ui/src/main/resources/jcr_root/conf/global.json    | 593 ++++++++++-----------
 9 files changed, 559 insertions(+), 443 deletions(-)

diff --git a/api/src/test/resources/content.json b/api/src/test/resources/content.json
index 7622552..36fd389 100644
--- a/api/src/test/resources/content.json
+++ b/api/src/test/resources/content.json
@@ -42,7 +42,7 @@
     "apache": {
         "jcr:primaryType": "sling:OrderedFolder",
         "jcr:createdBy": "admin",
-        "sling:configRef": "/conf/global",
+        "sling:configRef": "/conf/asf",
         "jcr:created": "Wed May 15 2019 12:40:00 GMT-0400",
         "jcr:content": {
             "jcr:primaryType": "nt:unstructured",
@@ -60,7 +60,7 @@
                 "jcr:content": {
                     "jcr:primaryType": "nt:unstructured",
                     "jcr:title": "Not Published",
-                    "sling:template": "/conf/global/site/templates/base-page",
+                    "sling:template": "/conf/asf/site/templates/base-page",
                     "sling:resourceType": "reference/components/pages/base",
                     "sling:published": false
                 }
diff --git a/core/src/main/java/org/apache/sling/cms/core/insights/impl/PageInsightRequestImpl.java b/core/src/main/java/org/apache/sling/cms/core/insights/impl/PageInsightRequestImpl.java
index eadd4cd..8d0edd9 100644
--- a/core/src/main/java/org/apache/sling/cms/core/insights/impl/PageInsightRequestImpl.java
+++ b/core/src/main/java/org/apache/sling/cms/core/insights/impl/PageInsightRequestImpl.java
@@ -20,6 +20,7 @@ package org.apache.sling.cms.core.insights.impl;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.security.NoSuchAlgorithmException;
 import java.util.HashMap;
 import java.util.Map;
@@ -28,6 +29,7 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.cms.Page;
@@ -36,6 +38,7 @@ import org.apache.sling.engine.SlingRequestProcessor;
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
+import org.jsoup.select.Elements;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,7 +49,7 @@ public class PageInsightRequestImpl implements PageInsightRequest {
 
     private static final Logger log = LoggerFactory.getLogger(PageInsightRequestImpl.class);
 
-    private Map<String, String> markupCache = new HashMap<>();
+    private String markupCache;
 
     private final Page page;
 
@@ -60,25 +63,6 @@ public class PageInsightRequestImpl implements PageInsightRequest {
         this.resourceResolver = page.getResource().getResourceResolver();
     }
 
-    private String getContents(String url) {
-        log.trace("getLocalPageHTML");
-        if (!markupCache.containsKey(url)) {
-            String requestPath = page.getPath() + ".html";
-            log.debug("Loading local page HTML from {}", requestPath);
-            HttpServletRequest req = new FakeRequest("GET", requestPath);
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            HttpServletResponse resp;
-            try {
-                resp = new FakeResponse(out);
-                requestProcessor.processRequest(req, resp, resourceResolver);
-            } catch (ServletException | IOException | NoSuchAlgorithmException e) {
-                log.warn("Exception retrieving page contents for {}", url, e);
-            }
-            markupCache.put(url, out.toString());
-        }
-        return markupCache.get(url);
-    }
-
     @Override
     public Page getPage() {
         return this.page;
@@ -86,12 +70,18 @@ public class PageInsightRequestImpl implements PageInsightRequest {
 
     @Override
     public Element getPageBodyElement() throws IOException {
-        return Jsoup.parseBodyFragment(getPageBodyHtml()).body();
+        Document doc = getPageDocument();
+        Elements main = doc.getElementsByTag("main");
+        if(!main.isEmpty()){
+            return main.first();
+        } else {
+            return doc.body();
+        }
     }
 
     @Override
     public String getPageBodyHtml() throws IOException {
-        return getContents(page.getPath() + "/jcr:content/container.html");
+        return getPageBodyElement().html();
     }
 
     @Override
@@ -101,7 +91,21 @@ public class PageInsightRequestImpl implements PageInsightRequest {
 
     @Override
     public String getPageHtml() throws IOException {
-        return getContents(page.getPath() + ".html");
+        if (markupCache == null) {
+            String url = page.getPath() + ".html";
+            log.debug("Loading local page HTML from {}", url);
+            HttpServletRequest req = new FakeRequest("GET", url);
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            HttpServletResponse resp;
+            try {
+                resp = new FakeResponse(out);
+                requestProcessor.processRequest(req, resp, resourceResolver);
+            } catch (ServletException | IOException | NoSuchAlgorithmException e) {
+                log.warn("Exception retrieving page contents for {}", url, e);
+            }
+            markupCache = new String(out.toByteArray(), StandardCharsets.UTF_8);
+        }
+        return markupCache;
     }
 
     @Override
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/models/PageInsightRequestModel.java b/core/src/main/java/org/apache/sling/cms/core/internal/models/PageInsightRequestModel.java
new file mode 100644
index 0000000..9ad5f49
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/models/PageInsightRequestModel.java
@@ -0,0 +1,38 @@
+/*
+ * 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.internal.models;
+
+import javax.inject.Inject;
+
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.cms.PageManager;
+import org.apache.sling.cms.core.insights.impl.PageInsightRequestImpl;
+import org.apache.sling.cms.insights.PageInsightRequest;
+import org.apache.sling.engine.SlingRequestProcessor;
+import org.apache.sling.models.annotations.Model;
+import org.apache.sling.models.annotations.injectorspecific.OSGiService;
+import org.apache.sling.models.annotations.injectorspecific.Self;
+
+@Model(adaptables = Resource.class, adapters = PageInsightRequest.class)
+public class PageInsightRequestModel extends PageInsightRequestImpl {
+
+    @Inject
+    public PageInsightRequestModel(@Self Resource resource, @OSGiService SlingRequestProcessor requestProcessor) {
+        super(resource.adaptTo(PageManager.class).getPage(), requestProcessor);
+    }
+
+}
diff --git a/reference/bnd.bnd b/reference/bnd.bnd
index 0f9f5bf..fb80601 100644
--- a/reference/bnd.bnd
+++ b/reference/bnd.bnd
@@ -1,2 +1,2 @@
-Sling-Initial-Content: jcr_root;ignoreImportProviders:=xml,jcr_root/content/apache;overwrite:=false;uninstall:=false;path:=/content/apache,jcr_root/etc/taxonomy/reference;overwrite:=false;uninstall:=false;path:=/etc/taxonomy/reference,jcr_root;ignoreImportProviders:=xml,jcr_root/apps/reference;overwrite:=true;uninstall:=true;path:=/apps/reference,jcr_root/static/clientlibs/reference;overwrite=true;ignoreImportProviders:=xml;path:=/static/clientlibs/reference
+Sling-Initial-Content: jcr_root;ignoreImportProviders:=xml,jcr_root/content/apache;overwrite:=false;uninstall:=false;path:=/content/apache,jcr_root/etc/taxonomy/reference;overwrite:=false;uninstall:=false;path:=/etc/taxonomy/reference,jcr_root;ignoreImportProviders:=xml,jcr_root/apps/reference;overwrite:=true;uninstall:=true;path:=/apps/reference,jcr_root/static/clientlibs/reference;overwrite=true;ignoreImportProviders:=xml;path:=/static/clientlibs/reference,jcr_root/conf/asf;overwrite=t [...]
 Sling-Model-Packages: org.apache.sling.cms.reference.models,org.apache.sling.cms.reference.forms.impl
\ No newline at end of file
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/rss/rss.xml.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/general/rss/rss.xml.jsp
index adac3fc..1f3c6a2 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/rss/rss.xml.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/rss/rss.xml.jsp
@@ -18,57 +18,65 @@
  */ --%><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
 <%@ page language="java" contentType="text/xml; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-	<c:set var="site" value="${sling:adaptTo(resource,'org.apache.sling.cms.SiteManager').site}" />
-	<channel>
-		<title>${sling:encode(site.title,'XML')}</title>
-		<description>${sling:encode(site.description,'XML')}</description>
-		<language>${site.locale.language}</language>
-		<link>${site.url}</link>
-		<image>
-			<url>${site.url}${fn:replace(properties.image,site.path,'')}</url>
-			<title>${sling:encode(site.title,'XML')}</title>
-			<link>${site.url}</link>
-		</image>
-		<atom:link href="${site.url}${fn:replace(resource.path,site.path,'')}.xml" rel="self" type="application/rss+xml" />
-		<c:set var="query" value="SELECT * FROM [sling:Page] WHERE ISDESCENDANTNODE([${site.path}/${properties.subpath}]) AND [jcr:content/published]=true ORDER BY [jcr:content/publishDate] DESC" />
-		<c:forEach var="postRsrc" items="${sling:findResources(resourceResolver,query,'JCR-SQL2')}" end="9">
-			<item>
-				<c:set var="post" value="${sling:adaptTo(postRsrc,'org.apache.sling.cms.PageManager').page}" />
-				<title><sling:encode value="${post.title}" mode="XML" /></title>
-				<dc:creator><sling:encode value="${post.properties.author}" mode="XML" /></dc:creator>
-				<description><sling:encode value="${post.properties['jcr:description']}" mode="XML" /></description>
-				<c:choose>
-					<c:when test="${fn:startsWith(post.properties['sling:thumbnail'],'http') && fn:indexOf(post.properties['sling:thumbnail'],'.png') != -1}">
-						<c:set var="thumbLink" value="${fn:replace(post.properties['sling:thumbnail'],'https:','http:')}" />
-						<c:set var="thumbType" value="image/png" />
-					</c:when>
-					<c:when test="${fn:startsWith(post.properties['sling:thumbnail'],'http') && fn:indexOf(post.properties['sling:thumbnail'],'.jpg') != -1}">
-						<c:set var="thumbLink" value="${fn:replace(post.properties['sling:thumbnail'],'https:','http:')}" />
-						<c:set var="thumbType" value="image/jpeg" />
-					</c:when>
-					<c:when test="${fn:indexOf(post.properties['sling:thumbnail'],'.png') != -1}">
-						<c:set var="thumbLink" value="${fn:replace(site.url,'https','http')}${fn:replace(post.properties['sling:thumbnail'],site.path,'')}" />
-						<c:set var="thumbType" value="image/png" />
-					</c:when>
-					<c:otherwise>
-						<c:set var="thumbLink" value="${fn:replace(site.url,'https','http')}${fn:replace(post.properties['sling:thumbnail'],site.path,'')}" />
-						<c:set var="thumbType" value="image/jpeg" />
-					</c:otherwise>
-				</c:choose>
-				<content:encoded>
-					<![CDATA[
-						<img src="${thumbLink}" title="${sling:encode(post.title,'XML_ATTR')}" />
-						<sling:encode value="${post.properties.snippet}" mode="XML" />
-					]]>
-				</content:encoded>
-				<c:if test="${not empty post.properties['sling:thumbnail']}">
-					<enclosure length="0" type="${thumbType}" url="${sling:encode(thumbLink,'XML_ATTR')}" />
-				</c:if>
-				<fmt:parseDate value="${post.properties.publishDate}" var="publishDate" pattern="yyyy-MM-dd" />
-				<pubDate><fmt:formatDate value="${publishDate}" pattern="EEE, dd MMM yyyy HH:mm:ss Z" /></pubDate>
-				<link>${site.url}${post.publishedPath}</link>
-				<guid isPermaLink="true">${site.url}${post.publishedPath}</guid>
-			</item>
-		</c:forEach>
-	</channel>
+    <c:set var="site" value="${sling:adaptTo(resource,'org.apache.sling.cms.SiteManager').site}" />
+    <channel>
+        <title>${sling:encode(site.title,'XML')}</title>
+        <description>${sling:encode(site.description,'XML')}</description>
+        <language>${site.locale.language}</language>
+        <link>${site.url}</link>
+        <image>
+            <url>${site.url}${fn:replace(properties.image,site.path,'')}</url>
+            <title>${sling:encode(site.title,'XML')}</title>
+            <link>${site.url}</link>
+        </image>
+        <atom:link href="${site.url}${fn:replace(resource.path,site.path,'')}.xml" rel="self" type="application/rss+xml" />
+        <c:set var="query" value="SELECT * FROM [sling:Page] WHERE ISDESCENDANTNODE([${site.path}/${properties.subpath}]) AND ([jcr:content/published]=true OR [jcr:content/sling:published]=true ) ORDER BY [jcr:content/publishDate] DESC" />
+        <c:forEach var="postRsrc" items="${sling:findResources(resourceResolver,query,'JCR-SQL2')}" end="9">
+            <item>
+                <c:set var="post" value="${sling:adaptTo(postRsrc,'org.apache.sling.cms.PageManager').page}" />
+                <title><sling:encode value="${post.title}" mode="XML" /></title>
+                <author><sling:encode value="${post.properties.author}" mode="XML" /></author>
+                <description><sling:encode value="${post.properties['jcr:description']}" mode="XML" /></description>
+                <c:choose>
+                    <c:when test="${fn:startsWith(post.properties['sling:thumbnail'],'http') && fn:indexOf(post.properties['sling:thumbnail'],'.png') != -1}">
+                        <c:set var="thumbLink" value="${fn:replace(post.properties['sling:thumbnail'],'https:','http:')}" />
+                        <c:set var="thumbType" value="image/png" />
+                    </c:when>
+                    <c:when test="${fn:startsWith(post.properties['sling:thumbnail'],'http') && fn:indexOf(post.properties['sling:thumbnail'],'.jpg') != -1}">
+                        <c:set var="thumbLink" value="${fn:replace(post.properties['sling:thumbnail'],'https:','http:')}" />
+                        <c:set var="thumbType" value="image/jpeg" />
+                    </c:when>
+                    <c:when test="${fn:indexOf(post.properties['sling:thumbnail'],'.png') != -1}">
+                        <c:set var="thumbLink" value="${fn:replace(site.url,'https','http')}${fn:replace(post.properties['sling:thumbnail'],site.path,'')}" />
+                        <c:set var="thumbType" value="image/png" />
+                    </c:when>
+                    <c:otherwise>
+                        <c:set var="thumbLink" value="${fn:replace(site.url,'https','http')}${fn:replace(post.properties['sling:thumbnail'],site.path,'')}" />
+                        <c:set var="thumbType" value="image/jpeg" />
+                    </c:otherwise>
+                </c:choose>
+                <content:encoded>
+                    <![CDATA[
+                        <img src="${thumbLink}" title="${sling:encode(post.title,'XML_ATTR')}" />
+                        <c:choose>
+                            <c:when test="${not empty post.properties.snippet}">
+                                    <sling:encode value="${post.properties.snippet}" mode="XML" />
+                            </c:when>
+                            <c:otherwise>
+                                <c:set var="insight" value="${sling:adaptTo(postRsrc,'org.apache.sling.cms.insights.PageInsightRequest')}" />
+                                ${insight.pageBodyHtml}
+                            </c:otherwise>
+                        </c:choose>
+                    ]]>
+                </content:encoded>
+                <c:if test="${not empty post.properties['sling:thumbnail']}">
+                    <enclosure length="0" type="${thumbType}" url="${sling:encode(thumbLink,'XML_ATTR')}" />
+                </c:if>
+                <fmt:parseDate value="${post.properties.publishDate}" var="publishDate" pattern="yyyy-MM-dd" />
+                <pubDate><fmt:formatDate value="${publishDate}" pattern="EEE, dd MMM yyyy HH:mm:ss Z" /></pubDate>
+                <link>${site.url}${post.publishedPath}</link>
+                <guid isPermaLink="true">${site.url}${post.publishedPath}</guid>
+            </item>
+        </c:forEach>
+    </channel>
 </rss>
\ No newline at end of file
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/sitemap/sitemap.xml.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/general/sitemap/sitemap.xml.jsp
index cb769b8..0f41687 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/sitemap/sitemap.xml.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/sitemap/sitemap.xml.jsp
@@ -20,7 +20,7 @@
 <%@include file="/libs/sling-cms/global.jsp"%>
 <c:set var="site" value="${sling:adaptTo(resource,'org.apache.sling.cms.SiteManager').site}" />
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-	<c:set var="query" value="SELECT * FROM [sling:Page] WHERE ISDESCENDANTNODE([${site.path}]) AND [jcr:content/published]=true AND ([jcr:content/hideInSitemap] IS NULL OR [jcr:content/hideInSitemap] <> true)" />
+	<c:set var="query" value="SELECT * FROM [sling:Page] WHERE ISDESCENDANTNODE([${site.path}]) AND ([jcr:content/published]=true OR [jcr:content/sling:published]=true) AND ([jcr:content/hideInSitemap] IS NULL OR [jcr:content/hideInSitemap] <> true)" />
 	<c:forEach var="pageRsrc" items="${sling:findResources(resourceResolver,query,'JCR-SQL2')}">
 		<c:set var="page" value="${sling:adaptTo(pageRsrc,'org.apache.sling.cms.PageManager').page}" />
 		<url>
diff --git a/reference/src/main/resources/jcr_root/conf/asf.json b/reference/src/main/resources/jcr_root/conf/asf.json
new file mode 100644
index 0000000..c1bcde6
--- /dev/null
+++ b/reference/src/main/resources/jcr_root/conf/asf.json
@@ -0,0 +1,117 @@
+{
+    "jcr:primaryType": "sling:OrderedFolder",
+    "jcr:content": {
+      "jcr:primaryType": "nt:unstructured",
+      "jcr:title": "Global"
+    },
+    "site": {
+      "jcr:primaryType": "sling:OrderedFolder",
+      "jcr:content": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:title": "ASF Site Configuration"
+      },
+      "templates": {
+        "jcr:primaryType": "sling:Config",
+        "jcr:title": "Templates",
+        "sling:resourceType": "sling-cms/components/caconfig/templates",
+        "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/asf/site/templates/base-page\",\r\n    \"sling:resourceType\": \"reference/components/pages/base\",\r\n    \"published\": false\r\n  }\r\n}",
+          "allowedPaths": ["/content/apache/.*"],
+          "sling:resourceType": "sling-cms/components/caconfig/template",
+          "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"
+            }
+          },
+          "policies": {
+            "jcr:primaryType": "nt:unstructured",
+            "policymapping": {
+              "jcr:primaryType": "nt:unstructured",
+              "sling:resourceType": "sling-cms/components/caconfig/policymapping",
+              "pathPattern": ".*",
+              "policyPath": "/conf/global/site/policies/bootstrap"
+            }
+          }
+        },
+        "rss-feed": {
+          "jcr:primaryType": "nt:unstructured",
+          "jcr:title": "RSS Feed",
+          "template": "{\r\n  \"jcr:primaryType\": \"sling:Folder\",\r\n  \"sling:resourceType\": \"reference/components/general/rss\",\r\n    \"image\": \"{{image}}\",\r\n  \"jcr:content\": {\r\n    \"jcr:primaryType\": \"nt:unstructured\",\r\n    \"jcr:title\": \"{{title}}\",\r\n    \"published\": true\r\n  }\r\n}",
+          "jcr:lastModifiedBy": "admin",
+          "allowedPaths": ["/content/apache/[a-z-_]*"],
+          "sling:resourceType": "sling-cms/components/caconfig/template",
+          "fields": {
+            "jcr:primaryType": "nt:unstructured",
+            "text": {
+              "jcr:primaryType": "nt:unstructured",
+              "required": true,
+              "name": ":name",
+              "type": "text",
+              "label": "Name",
+              "sling:resourceType": "sling-cms/components/editor/fields/text"
+            },
+            "text_1092486915": {
+              "jcr:primaryType": "nt:unstructured",
+              "required": true,
+              "name": "title",
+              "type": "text",
+              "label": "Title",
+              "sling:resourceType": "sling-cms/components/editor/fields/text"
+            },
+            "text_889576180": {
+              "jcr:primaryType": "nt:unstructured",
+              "required": true,
+              "name": "image",
+              "type": "url",
+              "label": "Image",
+              "sling:resourceType": "sling-cms/components/editor/fields/text"
+            }
+          }
+        },
+        "sitemap": {
+          "jcr:primaryType": "nt:unstructured",
+          "jcr:title": "Sitemap",
+          "template": "{\r\n  \"jcr:primaryType\": \"sling:Folder\",\r\n  \"sling:resourceType\": \"reference/components/general/sitemap\",\r\n  \"jcr:content\": {\r\n    \"jcr:primaryType\": \"nt:unstructured\",\r\n    \"jcr:title\": \"{{title}}\",\r\n    \"published\": true\r\n  }\r\n}",
+          "jcr:lastModifiedBy": "admin",
+          "allowedPaths": ["/content/apache/[a-z-_]*"],
+          "sling:resourceType": "sling-cms/components/caconfig/template",
+          "fields": {
+            "jcr:primaryType": "nt:unstructured",
+            "text": {
+              "jcr:primaryType": "nt:unstructured",
+              "required": true,
+              "name": ":name",
+              "type": "text",
+              "label": "Name",
+              "sling:resourceType": "sling-cms/components/editor/fields/text"
+            },
+            "text_1092486915": {
+              "jcr:primaryType": "nt:unstructured",
+              "required": true,
+              "name": "title",
+              "type": "text",
+              "label": "Title",
+              "sling:resourceType": "sling-cms/components/editor/fields/text"
+            }
+          }
+        }
+      }
+    }
+  }
+  
\ No newline at end of file
diff --git a/reference/src/main/resources/jcr_root/content/apache.json b/reference/src/main/resources/jcr_root/content/apache.json
index 36a6664..9ab5e24 100644
--- a/reference/src/main/resources/jcr_root/content/apache.json
+++ b/reference/src/main/resources/jcr_root/content/apache.json
@@ -1,42 +1,42 @@
 {
-	"jcr:primaryType": "sling:OrderedFolder",
-	"sling:configRef": "/conf/global",
-	"jcr:content": {
-		"jcr:primaryType": "nt:unstructured",
-		"jcr:title": "Apache Software Foundation"
-	},
-	"sling-apache-org": {
-		"jcr:primaryType": "sling:Site",
-		"jcr:title": "Apache Sling",
-		"jcr:language": "en",
-		"sling:url": "https://sling.apache.org",
-		"index": {
-			"jcr:primaryType": "sling:Page",
-			"jcr:content": {
-				"jcr:primaryType": "nt:unstructured",
-				"jcr:title": "Apache Sling - Bringing Back the Fun!",
-				"sling:template": "/conf/global/site/templates/base-page",
-				"sling:taxonomy": "/etc/taxonomy/reference/community",
-				"sling:resourceType": "reference/components/pages/base",
-				"published": true,
-				"hideInSitemap": false,
-				"container": {
-					"jcr:primaryType": "nt:unstructured",
-					"richtext": {
-						"jcr:primaryType": "nt:unstructured",
-						"text": "<p>Apache Sling™ is a framework for RESTful web-applications based on an extensible content tree.</p>\r\n<p>In a nutshell, Sling maps HTTP request URLs to content resources based on the request's path, extension and selectors. Using convention over configuration, requests are processed by scripts and servlets, dynamically selected based on the current resource. This fosters meaningful URLs and resource driven request processing, while the modular nature of Sling allows for [...]
-						"sling:resourceType": "sling-cms/components/general/richtext"
-					}
-				},
-				"menu": {
-					"jcr:primaryType": "nt:unstructured",
-					"richtext": {
-						"jcr:primaryType": "nt:unstructured",
-						"text": "<p>\r\n                <strong><a href=\"#\">Documentation</a></strong><br>\r\n                <a href=\"#\">Getting Started</a><br>\r\n                <a href=\"#\">The Sling Engine</a><br>\r\n                <a href=\"#\">Development</a><br>\r\n                <a href=\"#\">Bundles</a><br>\r\n                <a href=\"#\">Tutorials &amp; How-Tos</a><br>\r\n                <a href=\"http://sling.apache.org/components/\">Maven Plugins</a><br>\r\n                <a href=\"# [...]
-						"sling:resourceType": "sling-cms/components/general/richtext"
-					}
-				}
-			}
-		}
-	}
-}
\ No newline at end of file
+  "jcr:primaryType": "sling:OrderedFolder",
+  "sling:configRef": "/conf/asf",
+  "jcr:content": {
+    "jcr:primaryType": "nt:unstructured",
+    "jcr:title": "Apache Software Foundation"
+  },
+  "sling-apache-org": {
+    "jcr:primaryType": "sling:Site",
+    "jcr:title": "Apache Sling",
+    "jcr:language": "en",
+    "sling:url": "https://sling.apache.org",
+    "index": {
+      "jcr:primaryType": "sling:Page",
+      "jcr:content": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:title": "Apache Sling - Bringing Back the Fun!",
+        "sling:template": "/conf/asf/site/templates/base-page",
+        "sling:taxonomy": "/etc/taxonomy/reference/community",
+        "sling:resourceType": "reference/components/pages/base",
+        "published": true,
+        "hideInSitemap": false,
+        "container": {
+          "jcr:primaryType": "nt:unstructured",
+          "richtext": {
+            "jcr:primaryType": "nt:unstructured",
+            "text": "<p>Apache Sling™ is a framework for RESTful web-applications based on an extensible content tree.</p>\r\n<p>In a nutshell, Sling maps HTTP request URLs to content resources based on the request's path, extension and selectors. Using convention over configuration, requests are processed by scripts and servlets, dynamically selected based on the current resource. This fosters meaningful URLs and resource driven request processing, while the modular nature of Sling allo [...]
+            "sling:resourceType": "sling-cms/components/general/richtext"
+          }
+        },
+        "menu": {
+          "jcr:primaryType": "nt:unstructured",
+          "richtext": {
+            "jcr:primaryType": "nt:unstructured",
+            "text": "<p>\r\n                <strong><a href=\"#\">Documentation</a></strong><br>\r\n                <a href=\"#\">Getting Started</a><br>\r\n                <a href=\"#\">The Sling Engine</a><br>\r\n                <a href=\"#\">Development</a><br>\r\n                <a href=\"#\">Bundles</a><br>\r\n                <a href=\"#\">Tutorials &amp; How-Tos</a><br>\r\n                <a href=\"http://sling.apache.org/components/\">Maven Plugins</a><br>\r\n                <a hr [...]
+            "sling:resourceType": "sling-cms/components/general/richtext"
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/ui/src/main/resources/jcr_root/conf/global.json b/ui/src/main/resources/jcr_root/conf/global.json
index 9b4eae9..a7aef8c 100644
--- a/ui/src/main/resources/jcr_root/conf/global.json
+++ b/ui/src/main/resources/jcr_root/conf/global.json
@@ -1,335 +1,284 @@
 {
+  "jcr:primaryType": "sling:OrderedFolder",
+  "jcr:content": {
+    "jcr:primaryType": "nt:unstructured",
+    "jcr:title": "Global"
+  },
+  "files": {
     "jcr:primaryType": "sling:OrderedFolder",
     "jcr:content": {
+      "jcr:primaryType": "nt:unstructured",
+      "jcr:title": "File Configurations"
+    },
+    "editors": {
+      "jcr:primaryType": "sling:Config",
+      "jcr:title": "File Editors",
+      "sling:resourceType": "sling-cms/components/caconfig/fileeditor",
+      "default": {
         "jcr:primaryType": "nt:unstructured",
-        "jcr:title": "Global"
+        "jcr:title": "Default File Editor",
+        "sling:resourceType": "sling-cms/components/caconfig/fileeditor/config",
+        "fields": {
+          "jcr:primaryType": "nt:unstructured",
+          "title": {
+            "jcr:primaryType": "nt:unstructured",
+            "required": false,
+            "name": "jcr:content/jcr:title",
+            "type": "text",
+            "label": "Title",
+            "sling:resourceType": "sling-cms/components/editor/fields/text"
+          },
+          "jcrmimeType": {
+            "jcr:primaryType": "nt:unstructured",
+            "required": true,
+            "name": "jcr:content/jcr:mimeType",
+            "type": "text",
+            "label": "MIME Type",
+            "sling:resourceType": "sling-cms/components/editor/fields/text"
+          },
+          "licensing": {
+            "jcr:primaryType": "nt:unstructured",
+            "required": false,
+            "name": "jcr:content/licensing",
+            "type": "text",
+            "label": "Licensing",
+            "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"
+          },
+          "taxonomyTypeHint": {
+            "jcr:primaryType": "nt:unstructured",
+            "name": "jcr:content/sling:taxonomy@TypeHint",
+            "value": "String[]",
+            "sling:resourceType": "sling-cms/components/editor/fields/hidden"
+          },
+          "published": {
+            "jcr:primaryType": "nt:unstructured",
+            "name": "jcr:content/published",
+            "label": "Published",
+            "sling:resourceType": "sling-cms/components/editor/fields/publication"
+          },
+          "filemetadata": {
+            "jcr:primaryType": "nt:unstructured",
+            "name": "jcr:content/filemetadata",
+            "label": "File Metadata",
+            "sling:resourceType": "sling-cms/components/editor/fields/filemetadata"
+          }
+        }
+      }
     },
-    "files": {
-        "jcr:primaryType": "sling:OrderedFolder",
-        "jcr:content": {
+    "transformations": {
+      "jcr:primaryType": "sling:Config",
+      "jcr:title": "Transformations",
+      "sling:resourceType": "sling-cms/components/caconfig/transformations",
+      "sling-cms-thumbnail": {
+        "jcr:primaryType": "nt:unstructured",
+        "name": "sling-cms-thumbnail",
+        "sling:resourceType": "sling/thumbnails/transformation",
+        "handlers": {
+          "jcr:primaryType": "nt:unstructured",
+          "crop": {
             "jcr:primaryType": "nt:unstructured",
-            "jcr:title": "File Configurations"
-        },
-        "editors": {
-            "jcr:primaryType": "sling:Config",
-            "jcr:title": "File Editors",
-            "sling:resourceType": "sling-cms/components/caconfig/fileeditor",
-            "default": {
-                "jcr:primaryType": "nt:unstructured",
-                "jcr:title": "Default File Editor",
-                "sling:resourceType": "sling-cms/components/caconfig/fileeditor/config",
-                "fields": {
-                    "jcr:primaryType": "nt:unstructured",
-                    "title": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "required": false,
-                        "name": "jcr:content/jcr:title",
-                        "type": "text",
-                        "label": "Title",
-                        "sling:resourceType": "sling-cms/components/editor/fields/text"
-                    },
-                    "jcrmimeType": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "required": true,
-                        "name": "jcr:content/jcr:mimeType",
-                        "type": "text",
-                        "label": "MIME Type",
-                        "sling:resourceType": "sling-cms/components/editor/fields/text"
-                    },
-                    "licensing": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "required": false,
-                        "name": "jcr:content/licensing",
-                        "type": "text",
-                        "label": "Licensing",
-                        "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"
-                    },
-                    "taxonomyTypeHint": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "name": "jcr:content/sling:taxonomy@TypeHint",
-                        "value": "String[]",
-                        "sling:resourceType": "sling-cms/components/editor/fields/hidden"
-                    },
-                    "published": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "name": "jcr:content/published",
-                        "label": "Published",
-                        "sling:resourceType": "sling-cms/components/editor/fields/publication"
-                    },
-                    "filemetadata": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "name": "jcr:content/filemetadata",
-                        "label": "File Metadata",
-                        "sling:resourceType": "sling-cms/components/editor/fields/filemetadata"
-                    }
-                }
-            }
-        },
-        "transformations": {
-            "jcr:primaryType": "sling:Config",
-            "jcr:title": "Transformations",
-            "sling:resourceType": "sling-cms/components/caconfig/transformations",
-            "sling-cms-thumbnail": {
-                "jcr:primaryType": "nt:unstructured",
-                "name": "sling-cms-thumbnail",
-                "sling:resourceType": "sling/thumbnails/transformation",
-                "handlers": {
-                    "jcr:primaryType": "nt:unstructured",
-                    "crop": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "position": "CENTER",
-                        "height": "480",
-                        "width": "600",
-                        "sling:resourceType": "sling/thumbnails/transformers/crop"
-                    }
-                }
-            },
-            "sling-cms-thumbnail128": {
-                "jcr:primaryType": "nt:unstructured",
-                "name": "sling-cms-thumbnail128",
-                "sling:resourceType": "sling/thumbnails/transformation",
-                "handlers": {
-                    "jcr:primaryType": "nt:unstructured",
-                    "crop": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "position": "CENTER",
-                        "height": "128",
-                        "width": "128",
-                        "sling:resourceType": "sling/thumbnails/transformers/crop"
-                    }
-                }
-            },
-            "sling-cms-thumbnail32": {
-                "jcr:primaryType": "nt:unstructured",
-                "name": "sling-cms-thumbnail32",
-                "sling:resourceType": "sling/thumbnails/transformation",
-                "handlers": {
-                    "jcr:primaryType": "nt:unstructured",
-                    "crop": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "height": "32",
-                        "width": "32",
-                        "position": "CENTER",
-                        "sling:resourceType": "sling/thumbnails/transformers/crop"
-                    }
-                }
-            }
+            "position": "CENTER",
+            "height": "480",
+            "width": "600",
+            "sling:resourceType": "sling/thumbnails/transformers/crop"
+          }
+        }
+      },
+      "sling-cms-thumbnail128": {
+        "jcr:primaryType": "nt:unstructured",
+        "name": "sling-cms-thumbnail128",
+        "sling:resourceType": "sling/thumbnails/transformation",
+        "handlers": {
+          "jcr:primaryType": "nt:unstructured",
+          "crop": {
+            "jcr:primaryType": "nt:unstructured",
+            "position": "CENTER",
+            "height": "128",
+            "width": "128",
+            "sling:resourceType": "sling/thumbnails/transformers/crop"
+          }
+        }
+      },
+      "sling-cms-thumbnail32": {
+        "jcr:primaryType": "nt:unstructured",
+        "name": "sling-cms-thumbnail32",
+        "sling:resourceType": "sling/thumbnails/transformation",
+        "handlers": {
+          "jcr:primaryType": "nt:unstructured",
+          "crop": {
+            "jcr:primaryType": "nt:unstructured",
+            "height": "32",
+            "width": "32",
+            "position": "CENTER",
+            "sling:resourceType": "sling/thumbnails/transformers/crop"
+          }
         }
+      }
+    }
+  },
+  "site": {
+    "jcr:primaryType": "sling:OrderedFolder",
+    "jcr:content": {
+      "jcr:primaryType": "nt:unstructured",
+      "jcr:title": "Default Site Configuration"
     },
-    "site": {
-        "jcr:primaryType": "sling:OrderedFolder",
-        "jcr:content": {
+    "policies": {
+      "jcr:primaryType": "sling:Config",
+      "jcr:title": "Default Policy",
+      "sling:resourceType": "sling-cms/components/caconfig/policies",
+      "bootstrap": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:title": "Bootstrap CSS Policy",
+        "availableComponentTypes": ["General"],
+        "sling:resourceType": "sling-cms/components/caconfig/policy",
+        "componentConfigurations": {
+          "jcr:primaryType": "nt:unstructured",
+          "component": {
             "jcr:primaryType": "nt:unstructured",
-            "jcr:title": "Default Site Configuration"
-        },
-        "rewrite": {
-            "jcr:primaryType": "sling:Config",
-            "jcr:title": "Rewriter",
-            "sling:resourceType": "sling-cms/components/caconfig/rewriter",
-            "doctype": "<!DOCTYPE html>",
-            "attributes": [
-                "action",
-                "href",
-                "src"
-            ]
+            "fieldConfigGroups": "Form Field,General",
+            "checkInputClass": "form-check-input",
+            "fieldGroupClass": "form-group",
+            "checkLabelClass": "form-check-label",
+            "fieldRequiredClass": "text-danger",
+            "type": "reference/components/forms/form",
+            "submitClass": "btn btn-primary",
+            "fieldClass": "form-control",
+            "actionConfigGroups": "Form Action",
+            "providerConfigGroups": "Form Value Provider",
+            "sling:resourceType": "sling-cms/components/caconfig/component",
+            "checkFieldClass": "form-check",
+            "formClass": "form",
+            "alertClass": "alert alert-dark"
+          },
+          "component_1310080869": {
+            "jcr:primaryType": "nt:unstructured",
+            "ctaClasses": ["Primary=btn-primary"],
+            "type": "reference/components/general/cta",
+            "sling:resourceType": "sling-cms/components/caconfig/component"
+          },
+          "component_867209498": {
+            "jcr:primaryType": "nt:unstructured",
+            "type": "reference/components/general/columncontrol",
+            "containerclass": "container",
+            "columns": [
+              "100%=col-md-12",
+              "50% 50%=col-6,col-6",
+              "33% 33% 33%=col-4,col-4,col-4"
+            ],
+            "rowClass": "row",
+            "sling:resourceType": "sling-cms/components/caconfig/component"
+          },
+          "component_1644835788": {
+            "jcr:primaryType": "nt:unstructured",
+            "iframeClass": "frame",
+            "type": "reference/components/general/iframe",
+            "sling:resourceType": "sling-cms/components/caconfig/component",
+            "wrapperClasses": ["Responsive=embed-responsive"]
+          },
+          "component_1264147350": {
+            "jcr:primaryType": "nt:unstructured",
+            "type": "reference/components/general/image",
+            "sling:resourceType": "sling-cms/components/caconfig/component",
+            "imageClasses": ["Responsive=img-responsive"]
+          },
+          "component_2817746": {
+            "jcr:primaryType": "nt:unstructured",
+            "pageItemClass": "page-item",
+            "pageLinkClass": "page-link",
+            "type": "reference/components/general/list",
+            "paginationClass": "pagination",
+            "sling:resourceType": "sling-cms/components/caconfig/component"
+          },
+          "component_55724978": {
+            "jcr:primaryType": "nt:unstructured",
+            "pageItemClass": "page-item",
+            "pageLinkClass": "page-link",
+            "searchClass": "search",
+            "resultClass": "search-result",
+            "type": "reference/components/general/search",
+            "paginationClass": "pagination",
+            "resultHeaderClass": "search-header",
+            "sling:resourceType": "sling-cms/components/caconfig/component"
+          },
+          "component_928101893": {
+            "jcr:primaryType": "nt:unstructured",
+            "buttonClass": "btn btn-primary",
+            "type": "reference/components/general/searchform",
+            "sling:resourceType": "sling-cms/components/caconfig/component",
+            "inputClass": "input",
+            "formClass": "form"
+          },
+          "component_1816434016": {
+            "jcr:primaryType": "nt:unstructured",
+            "tagPage": "",
+            "listClass": "tag-list",
+            "type": "reference/components/general/tags",
+            "listTag": "div",
+            "sling:resourceType": "sling-cms/components/caconfig/component",
+            "itemTag": "div",
+            "itemClass": "tag-item"
+          }
+        }
+      }
+    },
+    "rewrite": {
+      "jcr:primaryType": "sling:Config",
+      "jcr:title": "Rewriter",
+      "sling:resourceType": "sling-cms/components/caconfig/rewriter",
+      "doctype": "<!DOCTYPE html>",
+      "attributes": ["action", "href", "src"]
+    },
+    "settings": {
+      "jcr:primaryType": "sling:Config",
+      "jcr:title": "Site Settings",
+      "sling:resourceType": "sling-cms/components/caconfig/sitesettings",
+      "taxonomyroot": "/etc/taxonomy"
+    },
+    "templates": {
+      "jcr:primaryType": "sling:Config",
+      "jcr:title": "Templates",
+      "sling:resourceType": "sling-cms/components/caconfig/templates",
+      "fragment": {
+        "jcr:primaryType": "nt:unstructured",
+        "jcr:title": "Fragment",
+        "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/fragment\",\r\n    \"sling:resourceType\": \"sling-cms/components/pages/fragment\",\r\n    \"published\": false\r\n  }\r\n}",
+        "allowedPaths": ["/content.*"],
+        "sling:resourceType": "sling-cms/components/caconfig/template",
+        "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"
+          }
         },
         "policies": {
-            "jcr:primaryType": "sling:Config",
-            "jcr:title": "Default Policy",
-            "sling:resourceType": "sling-cms/components/caconfig/policies",
-            "policy": {
-                "jcr:primaryType": "nt:unstructured",
-                "jcr:title": "Bootstrap CSS Policy",
-                "availableComponentTypes": [
-                    "General"
-                ],
-                "sling:resourceType": "sling-cms/components/caconfig/policy",
-                "componentConfigurations": {
-                    "jcr:primaryType": "nt:unstructured",
-                    "component": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "fieldConfigGroups": "Form Field,General",
-                        "checkInputClass": "form-check-input",
-                        "fieldGroupClass": "form-group",
-                        "checkLabelClass": "form-check-label",
-                        "fieldRequiredClass": "text-danger",
-                        "type": "reference/components/forms/form",
-                        "submitClass": "btn btn-primary",
-                        "fieldClass": "form-control",
-                        "actionConfigGroups": "Form Action",
-                        "providerConfigGroups": "Form Value Provider",
-                        "sling:resourceType": "sling-cms/components/caconfig/component",
-                        "checkFieldClass": "form-check",
-                        "formClass": "form",
-                        "alertClass": "alert alert-dark"
-                    },
-                    "component_1310080869": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "ctaClasses": [
-                            "Primary=btn-primary"
-                        ],
-                        "type": "reference/components/general/cta",
-                        "sling:resourceType": "sling-cms/components/caconfig/component"
-                    },
-                    "component_867209498": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "type": "reference/components/general/columncontrol",
-                        "containerclass": "container",
-                        "columns": [
-                            "100%=col-md-12",
-                            "50% 50%=col-6,col-6",
-                            "33% 33% 33%=col-4,col-4,col-4"
-                        ],
-                        "rowClass": "row",
-                        "sling:resourceType": "sling-cms/components/caconfig/component"
-                    },
-                    "component_1644835788": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "iframeClass": "frame",
-                        "type": "reference/components/general/iframe",
-                        "sling:resourceType": "sling-cms/components/caconfig/component",
-                        "wrapperClasses": [
-                            "Responsive=embed-responsive"
-                        ]
-                    },
-                    "component_1264147350": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "type": "reference/components/general/image",
-                        "sling:resourceType": "sling-cms/components/caconfig/component",
-                        "imageClasses": [
-                            "Responsive=img-responsive"
-                        ]
-                    },
-                    "component_2817746": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "pageItemClass": "page-item",
-                        "pageLinkClass": "page-link",
-                        "type": "reference/components/general/list",
-                        "paginationClass": "pagination",
-                        "sling:resourceType": "sling-cms/components/caconfig/component"
-                    },
-                    "component_55724978": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "pageItemClass": "page-item",
-                        "pageLinkClass": "page-link",
-                        "searchClass": "search",
-                        "resultClass": "search-result",
-                        "type": "reference/components/general/search",
-                        "paginationClass": "pagination",
-                        "resultHeaderClass": "search-header",
-                        "sling:resourceType": "sling-cms/components/caconfig/component"
-                    },
-                    "component_928101893": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "buttonClass": "btn btn-primary",
-                        "type": "reference/components/general/searchform",
-                        "sling:resourceType": "sling-cms/components/caconfig/component",
-                        "inputClass": "input",
-                        "formClass": "form"
-                    },
-                    "component_1816434016": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "tagPage": "",
-                        "listClass": "tag-list",
-                        "type": "reference/components/general/tags",
-                        "listTag": "div",
-                        "sling:resourceType": "sling-cms/components/caconfig/component",
-                        "itemTag": "div",
-                        "itemClass": "tag-item"
-                    }
-                }
-            }
-        },
-        "settings": {
-            "jcr:primaryType": "sling:Config",
-            "jcr:title": "Site Settings",
-            "sling:resourceType": "sling-cms/components/caconfig/sitesettings",
-            "taxonomyroot": "/etc/taxonomy"
-        },
-        "templates": {
-            "jcr:primaryType": "sling:Config",
-            "jcr:title": "Templates",
-            "sling:resourceType": "sling-cms/components/caconfig/templates",
-            "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}",
-                "allowedPaths": [
-                    "/content/apache/sling-apache-org.*"
-                ],
-                "sling:resourceType": "sling-cms/components/caconfig/template",
-                "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"
-                    }
-                },
-                "policies": {
-                    "jcr:primaryType": "nt:unstructured",
-                    "policymapping": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "sling:resourceType": "sling-cms/components/caconfig/policymapping",
-                        "pathPattern": ".*",
-                        "policyPath": "/conf/global/site/policies/policy"
-                    }
-                }
-            },
-            "fragment": {
-                "jcr:primaryType": "nt:unstructured",
-                "jcr:title": "Fragment",
-                "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/fragment\",\r\n    \"sling:resourceType\": \"sling-cms/components/pages/fragment\",\r\n    \"published\": false\r\n  }\r\n}",
-                "allowedPaths": [
-                    "/content.*"
-                ],
-                "sling:resourceType": "sling-cms/components/caconfig/template",
-                "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"
-                    }
-                },
-                "policies": {
-                    "jcr:primaryType": "nt:unstructured",
-                    "policymapping": {
-                        "jcr:primaryType": "nt:unstructured",
-                        "sling:resourceType": "sling-cms/components/caconfig/policymapping",
-                        "pathPattern": ".*",
-                        "policyPath": "/conf/global/site/policies/policy"
-                    }
-                }
-            }
+          "jcr:primaryType": "nt:unstructured",
+          "policymapping": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/caconfig/policymapping",
+            "pathPattern": ".*",
+            "policyPath": "/conf/global/site/policies/bootstrap"
+          }
         }
+      }
     }
-}
\ No newline at end of file
+  }
+}