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


The following commit(s) were added to refs/heads/master by this push:
     new d90911f  Adding in reference content on start
d90911f is described below

commit d90911fa10cc580ee19850593929d72b884122e7
Author: Dan Klco <[email protected]>
AuthorDate: Thu May 31 15:30:08 2018 -0400

    Adding in reference content on start
---
 cms/reference/pom.xml                              |  2 ++
 .../reference/components/general/tags/tags.jsp     |  6 ++--
 .../main/resources/jcr_root/content/apache.json    | 42 ++++++++++++++++++++++
 .../resources/jcr_root/etc/taxonomy/reference.json |  8 +++++
 4 files changed, 55 insertions(+), 3 deletions(-)

diff --git a/cms/reference/pom.xml b/cms/reference/pom.xml
index 3fb3f50..800a101 100644
--- a/cms/reference/pom.xml
+++ b/cms/reference/pom.xml
@@ -53,6 +53,8 @@
                                                <Sling-Initial-Content>
                                                        jcr_root,
                                                        
jcr_root/apps/reference;overwrite:=true;uninstall:=true;path:=/apps/reference,
+                                                       
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/static/clientlibs/reference;overwrite=true;ignoreImportProviders:=xml;path:=/static/clientlibs/reference
                                                </Sling-Initial-Content>
                                                <Sling-Model-Packages>
diff --git 
a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
 
b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
index 47b9dd8..4ab9e85 100644
--- 
a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
+++ 
b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
@@ -18,12 +18,12 @@
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
 <sling:adaptTo adaptable="${resource}" 
adaptTo="org.apache.sling.cms.core.models.PageManager" var="pageMgr" />
-<c:set var="config" 
value="${pageMgr.page.template.componentConfigs['reference/components/general/tags']}"
 scope="request" />
-<c:set var="contentResource" 
value="${sling:getRelativeResource(page.resource,'jcr:content')}" />
+<c:set var="config" 
value="${sling:adaptTo(pageMgr.page.template.componentConfigs['reference/components/general/tags'],'org.apache.sling.api.resource.ValueMap')}"
 scope="request" />
+<c:set var="contentResource" 
value="${sling:getRelativeResource(pageMgr.page.resource,'jcr:content')}" />
 <c:set var="listTag" value="${empty config.listTag ? 'div' : config.listTag}" 
/>
 <c:set var="itemTag" value="${empty config.listTag ? 'span' : config.itemTag}" 
 />
 <${listTag} class="${config.listClass}">
-       <c:forEach var="tagPath" 
items="${contentResource.valueMap['keywords']}">
+       <c:forEach var="tagPath" 
items="${contentResource.valueMap['sling:taxonomy']}">
                <c:set var="tag" 
value="${sling:getResource(resourceResolver,tagPath)}" />
                <${itemTag} class="${config.itemClass}">
                        <a href="${config.tagPage}.html${tag.path}.html">
diff --git a/cms/reference/src/main/resources/jcr_root/content/apache.json 
b/cms/reference/src/main/resources/jcr_root/content/apache.json
new file mode 100644
index 0000000..16f392b
--- /dev/null
+++ b/cms/reference/src/main/resources/jcr_root/content/apache.json
@@ -0,0 +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": false,
+                               "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
diff --git 
a/cms/reference/src/main/resources/jcr_root/etc/taxonomy/reference.json 
b/cms/reference/src/main/resources/jcr_root/etc/taxonomy/reference.json
new file mode 100644
index 0000000..310d007
--- /dev/null
+++ b/cms/reference/src/main/resources/jcr_root/etc/taxonomy/reference.json
@@ -0,0 +1,8 @@
+{
+       "jcr:primaryType": "sling:Taxonomy",
+       "jcr:title": "Reference",
+       "community": {
+               "jcr:primaryType": "sling:Taxonomy",
+               "jcr:title": "Community"
+       }
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to