Commit 2c071803 authored by Mathijs den Burger's avatar Mathijs den Burger

HIPPLUG-1317 Reintegrate bugfix/HIPPLUG-1317

parents a638888e caabaa2e
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2010-2016 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -20,7 +20,7 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-content-blocks-demo-bootstrap</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</parent>
<name>Hippo Plugin Content Blocks Demo Bootstrap Configuration</name>
......
......@@ -356,20 +356,6 @@
<sv:value>/hst:hst/hst:configurations/contentblocksdemo/hst:pages</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="contentblocksdemo-configuration-pages-newsoverview">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializeitem</sv:value>
</sv:property>
<sv:property sv:name="hippo:sequence" sv:type="Double">
<sv:value>30077</sv:value>
</sv:property>
<sv:property sv:name="hippo:contentresource" sv:type="String">
<sv:value>hst/configurations/contentblocksdemo/pages/newsoverview.xml</sv:value>
</sv:property>
<sv:property sv:name="hippo:contentroot" sv:type="String">
<sv:value>/hst:hst/hst:configurations/contentblocksdemo/hst:pages</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="contentblocksdemo-configuration-pages-newspage">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializeitem</sv:value>
......@@ -384,20 +370,6 @@
<sv:value>/hst:hst/hst:configurations/contentblocksdemo/hst:pages</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="contentblocksdemo-configuration-pages-overview">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializeitem</sv:value>
</sv:property>
<sv:property sv:name="hippo:sequence" sv:type="Double">
<sv:value>30079</sv:value>
</sv:property>
<sv:property sv:name="hippo:contentresource" sv:type="String">
<sv:value>hst/configurations/contentblocksdemo/pages/overview.xml</sv:value>
</sv:property>
<sv:property sv:name="hippo:contentroot" sv:type="String">
<sv:value>/hst:hst/hst:configurations/contentblocksdemo/hst:pages</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="contentblocksdemo-configuration-pages-search">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializeitem</sv:value>
......@@ -510,20 +482,7 @@
<sv:value>/hst:hst/hst:configurations/contentblocksdemo/hst:components</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="contentblocksdemo-configuration-components-overview">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializeitem</sv:value>
</sv:property>
<sv:property sv:name="hippo:sequence" sv:type="Double">
<sv:value>30088</sv:value>
</sv:property>
<sv:property sv:name="hippo:contentresource" sv:type="String">
<sv:value>hst/configurations/contentblocksdemo/components/overview.xml</sv:value>
</sv:property>
<sv:property sv:name="hippo:contentroot" sv:type="String">
<sv:value>/hst:hst/hst:configurations/contentblocksdemo/hst:components</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="contentblocksdemo-configuration-components-search">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializeitem</sv:value>
......
<?xml version="1.0" encoding="UTF-8"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="overview">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
</sv:property>
<sv:property sv:name="hst:componentclassname" sv:type="String">
<sv:value>org.onehippo.forge.contentblocksdemo.components.Overview</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>overview.main.content</sv:value>
</sv:property>
</sv:node>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="newsoverview">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
</sv:property>
<sv:property sv:name="hst:referencecomponent" sv:type="String">
<sv:value>hst:pages/overview</sv:value>
</sv:property>
</sv:node>
<?xml version="1.0" encoding="UTF-8"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="overview">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
</sv:property>
<sv:property sv:name="hst:referencecomponent" sv:type="String">
<sv:value>hst:abstractpages/base</sv:value>
</sv:property>
<sv:node sv:name="main">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
</sv:property>
<sv:node sv:name="content">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
</sv:property>
<sv:property sv:name="hst:referencecomponent" sv:type="String">
<sv:value>hst:components/overview</sv:value>
</sv:property>
</sv:node>
</sv:node>
</sv:node>
\ No newline at end of file
......@@ -13,50 +13,6 @@
<sv:value>common/homepage</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="about">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:sitemapitem</sv:value>
</sv:property>
<sv:property sv:name="hst:componentconfigurationid" sv:type="String">
<sv:value>hst:pages/textpage</sv:value>
</sv:property>
<sv:property sv:name="hst:relativecontentpath" sv:type="String">
<sv:value>common/about-us</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="news">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:sitemapitem</sv:value>
</sv:property>
<sv:property sv:name="hst:componentconfigurationid" sv:type="String">
<sv:value>hst:pages/newsoverview</sv:value>
</sv:property>
<sv:property sv:name="hst:relativecontentpath" sv:type="String">
<sv:value>news</sv:value>
</sv:property>
<sv:node sv:name="_any_.html">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:sitemapitem</sv:value>
</sv:property>
<sv:property sv:name="hst:componentconfigurationid" sv:type="String">
<sv:value>hst:pages/newspage</sv:value>
</sv:property>
<sv:property sv:name="hst:relativecontentpath" sv:type="String">
<sv:value>${parent}/${1}</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="_any_">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:sitemapitem</sv:value>
</sv:property>
<sv:property sv:name="hst:componentconfigurationid" sv:type="String">
<sv:value>hst:pages/newsoverview</sv:value>
</sv:property>
<sv:property sv:name="hst:relativecontentpath" sv:type="String">
<sv:value>${parent}/${1}</sv:value>
</sv:property>
</sv:node>
</sv:node>
<sv:node sv:name="search">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:sitemapitem</sv:value>
......
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="hst:templates" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<?xml version="1.0" encoding="UTF-8"?><sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="hst:templates">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:templates</sv:value>
</sv:property>
......@@ -91,14 +90,6 @@
<sv:value>jsp/one-column/main/content.jsp</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="overview.main.content">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:template</sv:value>
</sv:property>
<sv:property sv:name="hst:renderpath" sv:type="String">
<sv:value>jsp/overview/main/content.jsp</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="search.main.content">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:template</sv:value>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2010-2016 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -20,7 +20,7 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-content-blocks-demo-bootstrap</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</parent>
<name>Hippo Plugin Content Blocks Demo Bootstrap Content</name>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2010-2016 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -20,7 +20,7 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-content-blocks-demo</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</parent>
<name>Hippo Plugin Content Blocks Demo Bootstrap</name>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2010-2016 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -20,7 +20,7 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-content-blocks-demo</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</parent>
<name>Hippo Plugin Content Blocks Demo CMS</name>
......@@ -92,6 +92,18 @@
<build>
<finalName>cms</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Hippo-Release-Version>${hippo.release.version}</Hippo-Release-Version>
<Project-Version>${project.version}</Project-Version>
<Project-Build>${buildNumber}</Project-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
......
......@@ -20,13 +20,13 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-release</artifactId>
<version>11.0.0-SNAPSHOT</version>
<version>11.1.0-SNAPSHOT</version>
</parent>
<name>Hippo Plugin Content Blocks Demo</name>
<description>Demo for the Hippo Plugin Content Blocks</description>
<artifactId>hippo-plugin-content-blocks-demo</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2010-2016 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -20,7 +20,7 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-content-blocks-demo</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
</parent>
<name>Hippo Plugin Content Blocks Demo Site</name>
......
/*
* Copyright 2010-2014 Hippo B.V. (http://www.onehippo.com)
*
* Licensed 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.onehippo.forge.contentblocksdemo.components;
import org.onehippo.forge.contentblocksdemo.componentsinfo.PageableListInfo;
import org.hippoecm.hst.core.parameters.ParametersInfo;
import org.hippoecm.hst.content.beans.standard.HippoBean;
import org.hippoecm.hst.core.component.HstComponentException;
import org.hippoecm.hst.core.component.HstRequest;
import org.hippoecm.hst.core.component.HstResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ParametersInfo(type = PageableListInfo.class)
public class Overview extends BaseComponent {
public static final Logger log = LoggerFactory.getLogger(Overview.class);
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException {
PageableListInfo info = getComponentParametersInfo(request);
HippoBean scope = request.getRequestContext().getContentBean();
if (scope == null) {
response.setStatus(404);
log.info("For an Overview component there must be a content bean available to search below. Cannot create an overview");
return;
}
createAndExecuteSearch(request, info, scope, null);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment