Commit 7415a1e4 authored by Unico Hommes's avatar Unico Hommes

HIPPLUG-1200 merge master changes into feature/translations-psp1

parents cc39f626 2aa6d41a
* text=auto !eol
/LICENSE -text
/NOTICE -text
/pom.xml svneol=native#text/plain
src/main/resources/contentblocks-validator.xml svneol=native#text/plain
src/main/resources/hippoecm-extension.xml svneol=native#text/plain
# Content Blocks Plugin
This is the Content Blocks plugin for Hippo CMS. Documentation on how to use this
plugin in your Hippo project can be found at:
http://www.onehippo.org/library/concepts/plugins/content-blocks/about.html
## Plugin Demo
A demo project is provided to see the plugin in action.
### Requirements
* Java 8 JDK
* Maven 3
### Download, Build and Run the Demo Project
1. Download the plugin's source code from https://code.onehippo.org/cms-community/hippo-plugin-content-blocks
* Alternatively you can clone the git repository on your local machine.
* Use the latest stable branch named "release/x" (or "demo/x" in case the
demo is tagged seperately) where "x" is the version number.
* If you want to build the master branch demo you must configure the Hippo
Maven snapshot repository. See
http://www.onehippo.org/library/development/build-hippo-cms-from-scratch.html
for instructions.
2. Extract the archive on your local file system.
3. Use Maven to build and run the demo project:
```bash
cd hippo-plugin-content-blocks/demo
mvn verify
mvn -P cargo.run
```
4. Hippo CMS will be available at http://localhost:8080/cms/ (login using
credentials `admin`/`admin`).
The demo website will be available at http://localhost:8080/site/.
### Development Branches
To build and run the demo from a development branch you may need to configure
access to the Hippo Maven snapshots repository. For more information see the
following documentation page:
http://www.onehippo.org/library/development/build-hippo-cms-from-scratch.html
This diff is collapsed.
Hippo Plugin Content Blocks Demo
Copyright 2009-2016 Hippo B.V. (http://www.onehippo.com)
This product includes software developed by:
Hippo B.V., Amsterdam, The Netherlands (http://www.onehippo.com/);
The Apache Software Foundation (http://www.apache.org/).
NOTICE: Only our own original work is licensed under the terms of the
Apache License Version 2.0. The licenses of some libraries might impose
different redistribution or general licensing terms than those stated in the
Apache License. Users and redistributors are hereby requested to verify these
conditions and agree upon them.
Running locally
===============
This project uses the Maven Cargo plugin to run the CMS and site locally in Tomcat.
From the project root folder, execute:
$ mvn clean install
$ mvn -P cargo.run
Access the CMS at http://localhost:8080/cms, and the site at http://localhost:8080/site
Logs are located in target/tomcat7x/logs
Building distribution
=====================
To build a Tomcat distribution tarball containing only deployable artifacts:
$ mvn clean install
$ mvn -P dist
See also src/main/assembly/distribution.xml if you need to customize the distribution.
Using JRebel
============
Set the environment variable REBEL_HOME to the directory containing jrebel.jar.
Build with:
$ mvn clean install -Djrebel
Start with:
$ mvn -P cargo.run -Djrebel
Best Practice for development
=============================
Use the option -Drepo.path=/some/path/to/repository during start up. This will avoid
your repository to be cleared when you do a mvn clean.
For example start your project with:
$ mvn -P cargo.run -Drepo.path=/home/usr/tmp/repo
or with jrebel:
$ mvn -P cargo.run -Drepo.path=/home/usr/tmp/repo -Djrebel
Hot deploy
==========
To hot deploy, redeploy or undeploy the CMS or site:
$ cd cms (or site)
$ mvn cargo:redeploy (or cargo:undeploy, or cargo:deploy)
Automatic Export
================
To have your repository changes automatically exported to filesystem during local development, log into
http://localhost:8080/cms/console and press the "Enable Auto Export" button at the top right. To set this
as the default for your project edit the file
./bootstrap/configuration/src/main/resources/configuration/modules/autoexport-module.xml
Monitoring with JMX Console
===========================
You may run the following command:
$ jconsole
Now open the local process org.apache.catalina.startup.Bootstrap start
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2015 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-content-blocks-demo-bootstrap</artifactId>
<version>3.0.0-SNAPSHOT</version>
</parent>
<name>Hippo Plugin Content Blocks Demo Bootstrap Configuration</name>
<description>Hippo Plugin Content Blocks Demo Bootstrap Configuration</description>
<artifactId>hippo-plugin-content-blocks-demo-bootstrap-configuration</artifactId>
<build>
<defaultGoal>install</defaultGoal>
</build>
</project>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:h="http://www.onehippo.org/jcr/xmlimport"
sv:name="autoexport" h:merge="combine">
<sv:node sv:name="hippo:moduleconfig" h:merge="combine">
<sv:property sv:name="autoexport:enabled" sv:type="Boolean" h:merge="override">
<sv:value>false</sv:value>
</sv:property>
<sv:property sv:name="autoexport:modules" sv:type="String" h:merge="override">
<sv:value>bootstrap/content:/content</sv:value>
<sv:value>bootstrap/configuration:/</sv:value>
</sv:property>
</sv:node>
</sv:node>
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="contentblocksdemo-subsite" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippostd:folder</sv:value>
</sv:property>
<sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
<sv:value>mix:referenceable</sv:value>
</sv:property>
<sv:property sv:name="hippostd:foldertype" sv:type="String" sv:multiple="true">
<sv:value>new-document</sv:value>
<sv:value>new-folder</sv:value>
</sv:property>
<sv:node sv:name="homepage">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:handle</sv:value>
</sv:property>
<sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
<sv:value>mix:referenceable</sv:value>
<sv:value>hippo:translated</sv:value>
</sv:property>
<sv:node sv:name="hippo:translation">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:translation</sv:value>
</sv:property>
<sv:property sv:name="hippo:language" sv:type="String">
<sv:value/>
</sv:property>
<sv:property sv:name="hippo:message" sv:type="String">
<sv:value>Home Page</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="homepage">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>contentblocksdemo:providercompounddocument</sv:value>
</sv:property>
<sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true">
<sv:value>mix:referenceable</sv:value>
<sv:value>hippotranslation:translated</sv:value>
</sv:property>
<sv:property sv:name="hippo:availability" sv:type="String" sv:multiple="true">
<sv:value>live</sv:value>
<sv:value>preview</sv:value>
</sv:property>
<sv:property sv:name="hippostd:holder" sv:type="String">
<sv:value>admin</sv:value>
</sv:property>
<sv:property sv:name="hippostd:state" sv:type="String">
<sv:value>published</sv:value>
</sv:property>
<sv:property sv:name="hippostd:stateSummary" sv:type="String">
<sv:value>live</sv:value>
</sv:property>
<sv:property sv:name="hippostdpubwf:createdBy" sv:type="String">
<sv:value>admin</sv:value>
</sv:property>
<sv:property sv:name="hippostdpubwf:creationDate" sv:type="Date">
<sv:value>2011-11-29T11:18:14.995+01:00</sv:value>
</sv:property>
<sv:property sv:name="hippostdpubwf:lastModificationDate" sv:type="Date">
<sv:value>2011-11-29T11:44:17.556+01:00</sv:value>
</sv:property>
<sv:property sv:name="hippostdpubwf:lastModifiedBy" sv:type="String">
<sv:value>admin</sv:value>
</sv:property>
<sv:property sv:name="hippostdpubwf:publicationDate" sv:type="Date">
<sv:value>2011-11-29T11:54:54.419+01:00</sv:value>
</sv:property>
<sv:property sv:name="hippotranslation:id" sv:type="String">
<sv:value>a4240db8-3b5d-45ce-96f0-a28ca3ba4003</sv:value>
</sv:property>
<sv:property sv:name="hippotranslation:locale" sv:type="String">
<sv:value>en</sv:value>
</sv:property>
<sv:property sv:name="contentblocksdemo:summary" sv:type="String">
<sv:value>This is an example subsite.</sv:value>
</sv:property>
<sv:property sv:name="contentblocksdemo:title" sv:type="String">
<sv:value>Example subsite</sv:value>
</sv:property>
<sv:node sv:name="contentblocksdemo:body">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippostd:html</sv:value>
</sv:property>
<sv:property sv:name="hippostd:content" sv:type="String">
<sv:value>&lt;html&gt;
&lt;body&gt;
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. In tempor, risus ac
ullamcorper consectetur, lectus quam pharetra dolor, quis rhoncus tortor magna
ac turpis. Nullam nunc diam, ornare vel pretium ac, lacinia sed dui. Nulla
vehicula hendrerit turpis, sed rutrum erat pretium at. Pellentesque habitant
morbi tristique senectus et netus et malesuada fames ac turpis egestas. Praesent
vitae ultrices magna. Quisque feugiat, tortor eget vulputate blandit, neque est
vestibulum risus, a venenatis dolor quam at eros. Phasellus ut massa mi, non
tempus lorem.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</sv:value>
</sv:property>
</sv:node>
</sv:node>
</sv:node>
</sv:node>
<?xml version="1.0" encoding="UTF-8"?><sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="hst:channels">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:channels</sv:value>
</sv:property>
<sv:node sv:name="contentblocksdemo">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:channel</sv:value>
</sv:property>
<sv:property sv:name="hst:channelinfoclass" sv:type="String">
<sv:value>org.onehippo.forge.contentblocksdemo.channels.WebsiteInfo</sv:value>
</sv:property>
<sv:property sv:name="hst:name" sv:type="String">
<sv:value>Content Blocks Demo</sv:value>
</sv:property>
<sv:property sv:name="hst:type" sv:type="String">
<sv:value>website</sv:value>
</sv:property>
<sv:node sv:name="hst:channelinfo">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:channelinfo</sv:value>
</sv:property>
<sv:property sv:name="headerName" sv:type="String">
<sv:value>Content Blocks Demo Site</sv:value>
</sv:property>
</sv:node>
</sv:node>
</sv:node>
<?xml version="1.0" encoding="UTF-8"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="hst:configurations" xmlns:esv="http://www.onehippo.org/jcr/xmlimport" esv:merge="combine">
<sv:node sv:name="contentblocksdemo">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:configuration</sv:value>
</sv:property>
</sv:node>
</sv:node>
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="hst:abstractpages" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:pages</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="base">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>layout.webpage</sv:value>
</sv:property>
<sv:node sv:name="header">
<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/header</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="main">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>base.main</sv:value>
</sv:property>
<sv:node sv:name="leftmenu">
<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/leftmenu</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="right">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>base.main.right</sv:value>
</sv:property>
</sv:node>
</sv:node>
</sv:node>
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="hst:catalog" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:catalog</sv:value>
</sv:property>
<sv:node sv:name="contentblocksdemo-catalog">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:containeritempackage</sv:value>
</sv:property>
<sv:node sv:name="list">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:containeritemcomponent</sv:value>
</sv:property>
<sv:property sv:name="hst:componentclassname" sv:type="String">
<sv:value>org.onehippo.forge.contentblocksdemo.components.ListView</sv:value>
</sv:property>
<sv:property sv:name="hst:iconpath" sv:type="String">
<sv:value>images/catalog-list.png</sv:value>
</sv:property>
<sv:property sv:name="hst:label" sv:type="String">
<sv:value>List</sv:value>
</sv:property>
<sv:property sv:name="hst:parameternames" sv:type="String">
<sv:value>title</sv:value>
<sv:value>pageSize</sv:value>
<sv:value>sortBy</sv:value>
</sv:property>
<sv:property sv:name="hst:parametervalues" sv:type="String">
<sv:value>List</sv:value>
<sv:value>3</sv:value>
<sv:value>contentblocksdemo:date</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>base.main.list</sv:value>
</sv:property>
<sv:property sv:name="hst:xtype" sv:type="String">
<sv:value>HST.Item</sv:value>
</sv:property>
</sv:node>
</sv:node>
</sv:node>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="hst:components" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:components</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="content">
<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.Detail</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>base.main.content</sv:value>
</sv:property>
</sv:node>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="header" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<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.Header</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>base.header</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="leftmenu">
<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.LeftMenu</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>base.main.leftmenu</sv:value>
</sv:property>
</sv:node>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="notfound" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<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.NotFound</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>notfound.main.content</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: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="search">
<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.Search</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>search.main.content</sv:value>
</sv:property>
</sv:node>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="hst:pages" xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:pages</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="home">
<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/content</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>home.main.content</sv:value>
</sv:property>
<sv:node sv:name="container">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:containercomponentreference</sv:value>
</sv:property>
<sv:property sv:name="hst:referencecomponent" sv:type="String">
<sv:value>home/container</sv:value>
</sv:property>
</sv:node>
</sv:node>
</sv:node>
</sv:node>
<?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="newspage">
<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/content</sv:value>
</sv:property>
<sv:property sv:name="hst:template" sv:type="String">
<sv:value>news.main.content</sv:value>
</sv:property>
</sv:node>
</sv:node>
</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="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">