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 2020/11/23 21:53:11 UTC

[sling-org-apache-sling-app-cms] 03/03: Adding support for fragmented content

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

commit d59644b1863257c7f01ade1d973fc24aae23ae12
Author: Dan Klco <dk...@apache.org>
AuthorDate: Mon Nov 23 16:08:35 2020 -0500

    Adding support for fragmented content
---
 core/pom.xml                                       |   4 +
 feature/src/main/features/app/cms.json             | 287 +++++++++++----------
 pom.xml                                            |  16 +-
 ui/src/main/resources/jcr_root/conf/global.json    |  39 ++-
 .../libs/sling-cms/components/pages/fragment.json  |   6 +
 .../sling-cms/components/pages/fragment/body.jsp   |  34 +++
 .../sling-cms/components/pages/fragment/edit.json  |  54 ++++
 .../components/pages/fragment/fragment.jsp         |  23 ++
 8 files changed, 315 insertions(+), 148 deletions(-)

diff --git a/core/pom.xml b/core/pom.xml
index af4f12d..1644c53 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -241,5 +241,9 @@
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.discovery.api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.github.jknack</groupId>
+            <artifactId>handlebars</artifactId>
+        </dependency>
     </dependencies>
 </project>
diff --git a/feature/src/main/features/app/cms.json b/feature/src/main/features/app/cms.json
index 7562b85..25f9e96 100644
--- a/feature/src/main/features/app/cms.json
+++ b/feature/src/main/features/app/cms.json
@@ -1,260 +1,263 @@
-
 {
-    "bundles":[
+    "bundles": [
         {
-            "id":"com.github.livesense:org.liveSense.fragment.sun.misc:1.0.5",
-            "start-order":"5"
+            "id": "com.github.livesense:org.liveSense.fragment.sun.misc:1.0.5",
+            "start-order": "5"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.launchpad.api:1.2.0",
-            "start-order":"5"
+            "id": "org.apache.sling:org.apache.sling.launchpad.api:1.2.0",
+            "start-order": "5"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.launchpad.startupmanager:1.0.0",
-            "start-order":"5"
+            "id": "org.apache.sling:org.apache.sling.launchpad.startupmanager:1.0.0",
+            "start-order": "5"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.cms.api:${cms.version}",
-            "start-order":"20"
+            "id": "org.apache.sling:org.apache.sling.cms.api:${cms.version}",
+            "start-order": "20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.cms.ui:${cms.version}",
-            "start-order":"20"
+            "id": "org.apache.sling:org.apache.sling.cms.ui:${cms.version}",
+            "start-order": "20"
         },
         {
-            "id":"com.vladsch.flexmark:flexmark-osgi:0.61.24",
-            "start-order":"15"
+            "id": "com.vladsch.flexmark:flexmark-osgi:0.61.24",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.cocoon:cocoon-serializers-charsets:1.0.2",
-            "start-order":"15"
+            "id": "org.apache.cocoon:cocoon-serializers-charsets:1.0.2",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.commons:commons-compress:1.20",
-            "start-order":"15"
+            "id": "org.apache.commons:commons-compress:1.20",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.commons:commons-csv:1.8",
-            "start-order":"15"
+            "id": "org.apache.commons:commons-csv:1.8",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.commons:commons-email:1.5",
-            "start-order":"15"
+            "id": "org.apache.commons:commons-email:1.5",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.commons:commons-math3:3.6.1",
-            "start-order":"15"
+            "id": "org.apache.commons:commons-math3:3.6.1",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.jackrabbit:oak-auth-external:${oak.version}",
-            "start-order":"15"
+            "id": "org.apache.jackrabbit:oak-auth-external:${oak.version}",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.jackrabbit:oak-auth-ldap:${oak.version}",
-            "start-order":"15"
+            "id": "org.apache.jackrabbit:oak-auth-ldap:${oak.version}",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.servicemix.bundles:org.apache.servicemix.bundles.xmlbeans:3.0.2_1",
-            "start-order":"15"
+            "id": "org.apache.servicemix.bundles:org.apache.servicemix.bundles.xmlbeans:3.0.2_1",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.fileoptim:0.9.4",
-            "start-order":"20"
+            "id": "org.apache.sling:org.apache.sling.fileoptim:0.9.4",
+            "start-order": "20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.resourcemerger:1.3.10",
-            "start-order":"15"
+            "id": "org.apache.sling:org.apache.sling.resourcemerger:1.3.10",
+            "start-order": "15"
         },
         {
-            "id":"org.jsoup:jsoup:1.13.1",
-            "start-order":"15"
+            "id": "org.jsoup:jsoup:1.13.1",
+            "start-order": "15"
         },
         {
-            "id":"com.sun.mail:javax.mail:1.6.2",
-            "start-order":"15"
+            "id": "com.sun.mail:javax.mail:1.6.2",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.commons:commons-text:1.8",
-            "start-order":"15"
+            "id": "org.apache.commons:commons-text:1.8",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.servicemix.bundles:org.apache.servicemix.bundles.jasypt:1.9.3_1",
-            "start-order":"15"
+            "id": "org.apache.servicemix.bundles:org.apache.servicemix.bundles.jasypt:1.9.3_1",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.servicemix.bundles:org.apache.servicemix.bundles.poi:4.1.1_1",
-            "start-order":"15"
+            "id": "org.apache.servicemix.bundles:org.apache.servicemix.bundles.poi:4.1.1_1",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.cms.core:${cms.version}",
-            "start-order":"20"
+            "id": "org.apache.sling:org.apache.sling.cms.core:${cms.version}",
+            "start-order": "20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.cms.reference:${cms.version}",
-            "start-order":"20"
+            "id": "org.apache.sling:org.apache.sling.cms.reference:${cms.version}",
+            "start-order": "20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.cms.transformer:${cms.version}",
-            "start-order":"20"
+            "id": "org.apache.sling:org.apache.sling.cms.transformer:${cms.version}",
+            "start-order": "20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.cms.login:${cms.version}",
-            "start-order":"20"
+            "id": "org.apache.sling:org.apache.sling.cms.login:${cms.version}",
+            "start-order": "20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.commons.crypto:1.0.0",
-            "start-order":"15"
+            "id": "org.apache.sling:org.apache.sling.commons.crypto:1.0.0",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.commons.html:1.1.0",
-            "start-order":"15"
+            "id": "org.apache.sling:org.apache.sling.commons.html:1.1.0",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.commons.messaging.mail:1.0.0",
-            "start-order":"15"
+            "id": "org.apache.sling:org.apache.sling.commons.messaging.mail:1.0.0",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.commons.messaging:1.0.0",
-            "start-order":"15"
+            "id": "org.apache.sling:org.apache.sling.commons.messaging:1.0.0",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.rewriter:1.2.2",
-            "start-order":"15"
+            "id": "org.apache.sling:org.apache.sling.rewriter:1.2.2",
+            "start-order": "15"
         },
         {
-            "id":"org.apache.tika:tika-bundle:1.22",
-            "start-order":"15"
+            "id": "org.apache.tika:tika-bundle:1.22",
+            "start-order": "15"
         },
         {
-            "id":"org.codehaus.groovy:groovy-all:2.4.19",
-            "start-order":"15"
+            "id": "org.codehaus.groovy:groovy-all:2.4.19",
+            "start-order": "15"
+        },
+        {
+            "id": "com.github.jknack:handlebars:4.2.0",
+            "start-order": "20"
         }
     ],
-    "configurations":{
-        "org.apache.sling.servlets.get.DefaultGetServlet":{
-            "index.files":[
+    "configurations": {
+        "org.apache.sling.servlets.get.DefaultGetServlet": {
+            "index.files": [
                 "index",
                 "index.html"
             ],
-            "aliases":[
+            "aliases": [
                 ""
             ],
-            "enable.html":false,
-            "json.maximumresults:Integer":"200",
-            "enable.txt":false,
-            "enable.xml":false,
-            "index":false,
-            "enable.json":true,
-            "ecmaSuport":true
-        },
-        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~index":{
-            "mbean.name":"org.apache.jackrabbit.oak:name=async,type=IndexStats",
-            "hc.tags":[
+            "enable.html": false,
+            "json.maximumresults:Integer": "200",
+            "enable.txt": false,
+            "enable.xml": false,
+            "index": false,
+            "enable.json": true,
+            "ecmaSuport": true
+        },
+        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~index": {
+            "mbean.name": "org.apache.jackrabbit.oak:name=async,type=IndexStats",
+            "hc.tags": [
                 "oak",
                 "system-resources"
             ],
-            "hc.name":"Jackrabbit Oak - Index",
-            "attribute.value.constraint":"false",
-            "attribute.name":"Failing",
-            "statusForFailedContraint":"CRITICAL"
-        },
-        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~jobqueue":{
-            "mbean.name":"org.apache.sling:type=queues,name=AllQueues",
-            "hc.tags":[
+            "hc.name": "Jackrabbit Oak - Index",
+            "attribute.value.constraint": "false",
+            "attribute.name": "Failing",
+            "statusForFailedContraint": "CRITICAL"
+        },
+        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~jobqueue": {
+            "mbean.name": "org.apache.sling:type=queues,name=AllQueues",
+            "hc.tags": [
                 "sling",
                 "system-resources"
             ],
-            "hc.name":"Sling - Job Queue",
-            "attribute.value.constraint":"< 1000",
-            "attribute.name":"NumberOfQueuedJobs",
-            "statusForFailedContraint":"WARN"
-        },
-        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~luceneindex":{
-            "mbean.name":"org.apache.jackrabbit.oak:name=Lucene Index statistics,type=LuceneIndex",
-            "hc.tags":[
+            "hc.name": "Sling - Job Queue",
+            "attribute.value.constraint": "< 1000",
+            "attribute.name": "NumberOfQueuedJobs",
+            "statusForFailedContraint": "WARN"
+        },
+        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~luceneindex": {
+            "mbean.name": "org.apache.jackrabbit.oak:name=Lucene Index statistics,type=LuceneIndex",
+            "hc.tags": [
                 "oak",
                 "system-resources"
             ],
-            "hc.name":"Jackrabbit Oak - Lucene Index",
-            "attribute.value.constraint":"false",
-            "attribute.name":"Failing",
-            "statusForFailedContraint":"CRITICAL"
-        },
-        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~requestdurationcritical":{
-            "mbean.name":"org.apache.sling:type=engine,service=RequestProcessor",
-            "hc.tags":[
+            "hc.name": "Jackrabbit Oak - Lucene Index",
+            "attribute.value.constraint": "false",
+            "attribute.name": "Failing",
+            "statusForFailedContraint": "CRITICAL"
+        },
+        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~requestdurationcritical": {
+            "mbean.name": "org.apache.sling:type=engine,service=RequestProcessor",
+            "hc.tags": [
                 "sling",
                 "system-resources"
             ],
-            "hc.name":"Sling - StdDev Request Duration (CRITICAL)",
-            "attribute.value.constraint":"matches (1|2|3|4)?\\d?\\d\\..*",
-            "attribute.name":"StandardDeviationDurationMsec",
-            "statusForFailedContraint":"CRITICAL"
-        },
-        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~requestdurationwarn":{
-            "mbean.name":"org.apache.sling:type=engine,service=RequestProcessor",
-            "hc.tags":[
+            "hc.name": "Sling - StdDev Request Duration (CRITICAL)",
+            "attribute.value.constraint": "matches (1|2|3|4)?\\d?\\d\\..*",
+            "attribute.name": "StandardDeviationDurationMsec",
+            "statusForFailedContraint": "CRITICAL"
+        },
+        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~requestdurationwarn": {
+            "mbean.name": "org.apache.sling:type=engine,service=RequestProcessor",
+            "hc.tags": [
                 "sling",
                 "system-resources"
             ],
-            "hc.name":"Sling - StdDev Request Duration (WARN)",
-            "attribute.value.constraint":"matches (1)?\\d?\\d\\..*",
-            "attribute.name":"StandardDeviationDurationMsec",
-            "statusForFailedContraint":"WARN"
-        },
-        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~slowqueries":{
-            "mbean.name":"org.apache.jackrabbit.oak:name=Oak Query Statistics,type=QueryStats",
-            "hc.tags":[
+            "hc.name": "Sling - StdDev Request Duration (WARN)",
+            "attribute.value.constraint": "matches (1)?\\d?\\d\\..*",
+            "attribute.name": "StandardDeviationDurationMsec",
+            "statusForFailedContraint": "WARN"
+        },
+        "org.apache.felix.hc.generalchecks.JmxAttributeCheck~slowqueries": {
+            "mbean.name": "org.apache.jackrabbit.oak:name=Oak Query Statistics,type=QueryStats",
+            "hc.tags": [
                 "oak",
                 "system-resources"
             ],
-            "hc.name":"Jackrabbit Oak - Slow Queries",
-            "attribute.value.constraint":"0",
-            "attribute.name":"SlowQueriesQueueSize",
-            "statusForFailedContraint":"WARN"
+            "hc.name": "Jackrabbit Oak - Slow Queries",
+            "attribute.value.constraint": "0",
+            "attribute.name": "SlowQueriesQueueSize",
+            "statusForFailedContraint": "WARN"
         },
-        "org.apache.sling.hc.support.DefaultLoginsHealthCheck~slingcms":{
-            "logins":[
+        "org.apache.sling.hc.support.DefaultLoginsHealthCheck~slingcms": {
+            "logins": [
                 "admin:admin"
             ],
-            "hc.tags":[
+            "hc.tags": [
                 "configuration"
             ],
-            "hc.name":"Sling CMS - Default Logins Check"
+            "hc.name": "Sling CMS - Default Logins Check"
         },
-        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-error":{
-            "user.mapping":[
+        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-error": {
+            "user.mapping": [
                 "org.apache.sling.cms.core:sling-cms-error=sling-cms-error",
                 "org.apache.sling.models.impl:sling-cms-error=sling-cms-error"
             ]
         },
-        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-metadata":{
-            "user.mapping":[
+        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-metadata": {
+            "user.mapping": [
                 "org.apache.sling.cms.core:sling-cms-metadata=sling-cms-metadata"
             ]
         },
-        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-transformer":{
-            "user.mapping":[
+        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-transformer": {
+            "user.mapping": [
                 "org.apache.sling.cms.transformer:sling-cms-transformer=sling-cms-transformer"
             ]
         },
-        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-ugc":{
-            "user.mapping":[
+        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-ugc": {
+            "user.mapping": [
                 "org.apache.sling.cms.core:sling-cms-ugc=sling-cms-ugc"
             ]
         },
-        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-versionmgr":{
-            "user.mapping":[
+        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-cms-versionmgr": {
+            "user.mapping": [
                 "org.apache.sling.cms.core:sling-cms-versionmgr=sling-cms-versionmgr"
             ]
         },
-        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling.rewriter":{
-            "user.mapping":[
+        "org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling.rewriter": {
+            "user.mapping": [
                 "org.apache.sling.rewriter=sling-rewriter"
             ]
         }
     },
-    "repoinit:TEXT|true":[
+    "repoinit:TEXT|true": [
         "",
         "# CMS root paths",
         "create path (sling:OrderedFolder) /etc/i18n",
diff --git a/pom.xml b/pom.xml
index 897c153..5305f8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!-- 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
@@ -207,10 +207,10 @@
                 <scope>provided</scope>
             </dependency>
             <dependency>
-              <groupId>org.apache.sling</groupId>
-              <artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>
-              <version>2.4.0</version>
-              <scope>provided</scope>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>
+                <version>2.4.0</version>
+                <scope>provided</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.sling</groupId>
@@ -221,6 +221,12 @@
 
             <!-- Utilities / Misc -->
             <dependency>
+                <groupId>com.github.jknack</groupId>
+                <artifactId>handlebars</artifactId>
+                <version>4.2.0</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
                 <groupId>com.sun.mail</groupId>
                 <artifactId>javax.mail</artifactId>
                 <version>1.6.2</version>
diff --git a/ui/src/main/resources/jcr_root/conf/global.json b/ui/src/main/resources/jcr_root/conf/global.json
index 7ec5881..46e0eca 100644
--- a/ui/src/main/resources/jcr_root/conf/global.json
+++ b/ui/src/main/resources/jcr_root/conf/global.json
@@ -304,7 +304,44 @@
                         "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"
+                    }
+                }
             }
         }
     }
-}
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment.json
new file mode 100644
index 0000000..dda3efc
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment.json
@@ -0,0 +1,6 @@
+{
+    "jcr:primaryType" : "sling:Component",
+    "sling:resourceSuperType" : "sling-cms/components/pages/base",
+    "jcr:title": "CMS - Fragment Page",
+    "componentType": "Page"
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/body.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/body.jsp
new file mode 100644
index 0000000..a8b305b
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/body.jsp
@@ -0,0 +1,34 @@
+<%-- /*
+ * 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"%>
+<body class="cms">
+    <div class="gradient"></div>
+    <div class="main-section has-background-light">
+        <div class="columns">
+            <div class="column has-background-white-bis" style="overflow-y: auto; height: 100vh">
+                <div class="Main-Content">
+                    <sling:call script="/libs/sling-cms/components/editor/scripts/init.jsp" />
+                    <sling:include path="container" resourceType="sling-cms/components/general/container" />
+                    <sling:call script="/libs/sling-cms/components/editor/scripts/finalize.jsp" />
+                </div>
+            </div>
+        </div>
+    </div>
+    <sling:call script="scripts.jsp" />
+</body>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/edit.json
new file mode 100644
index 0000000..3f47245
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/edit.json
@@ -0,0 +1,54 @@
+{
+    "jcr:primaryType": "nt:unstructured",
+    "sling:resourceType": "sling-cms/components/editor/slingform",
+    "button": "Save Page",
+    "fields": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "sling-cms/components/general/container",
+        "title": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/editor/fields/text",
+            "label": "Title",
+            "name": "jcr:title",
+            "required": true
+        },
+        "description": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/editor/fields/textarea",
+            "label": "Description",
+            "name": "jcr:description"
+        },
+        "taxonomy": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/editor/fields/taxonomy",
+            "label": "Keywords",
+            "name": "sling:taxonomy"
+        },
+        "taxonomyTypeHint": {
+            "jcr:primaryType": "nt:unstructured",
+            "name": "jcr:content/sling:taxonomy@TypeHint",
+            "value": "String[]",
+            "sling:resourceType": "sling-cms/components/editor/fields/hidden"
+        },
+        "canonical": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/editor/fields/path",
+            "basePath": "/content",
+            "type": "page",
+            "label": "Canonical",
+            "name": "canonical"
+        },
+        "publication": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/editor/fields/publication",
+            "label": "Publication"
+        },
+        "template": {
+            "jcr:primaryType": "nt:unstructured",
+            "sling:resourceType": "sling-cms/components/editor/fields/text",
+            "label": "Template",
+            "name": "sling:template",
+            "disabled": true
+        }
+    }
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/fragment.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/fragment.jsp
new file mode 100644
index 0000000..ba73388
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/fragment/fragment.jsp
@@ -0,0 +1,23 @@
+<%-- /*
+ * 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"%>
+<html lang="en">
+	<sling:call script="head.jsp" />
+	<sling:call script="body.jsp" />
+</html>