How to use the Repository Data Development Module

23 views
Skip to first unread message

Marcel Riegler

unread,
Jun 12, 2018, 9:29:03 AM6/12/18
to Hippo Community
Hi,

I've looked at the documentation regarding the difference between application data and development data. I understand it on a conceptual level, but I'm having trouble understanding how I would actually use this in a project.

To be more explicit, i'll give an example. I want to add a new document type and a component to display it.
The changes in hst:configuration are needed everywhere, so that can just be autoexported. Dito the changes in the namespace.

But I also want to create a couple sample documents and add the component to a page that showcases its use. 
If i do this as i normally do, the content and the page get autoexported into application data.
Very specifically speaking, what do I do? Do I manually recreate the entire structure in development data? Can I reconfigure AutoExport to export some things to development data?

Thank you for taking your time to help me.

Peter Centgraf

unread,
Jun 12, 2018, 11:36:33 AM6/12/18
to Hippo Community
You're on the right track. Yes, there are two things you can do:

1. Manually copy-paste the appropriate YAML files (or portions of files) from the application module to the development module. (Shutdown your local process first, and restart after you've moved things around.) The default auto-export config will update any JCR nodes that already exist in the development module in-place, while any new nodes will go to the application module. This is a good first step.

2. If you plan to build up a bunch of sample data over a period of time, you can adjust the auto-export config to direct everything under a specific JCR path to the development module automatically. You can do this for more than one JCR path, for example to handle sample documents and sample assets. It's helpful to group your sample content into a folder, so you don't need to list individual document nodes.

To do this, you'd typically adjust the YAML in repository-data/development/src/main/resources/hcm-config/main.yaml. That file includes a definition for the JCR node /hippo:configuration/hippo:modules/autoexport/hippo:moduleconfig. It adds a new value to the property autoexport:modules to register the 'repository-data/development' module. If you change that value to e.g. 'repository-data/development:/content/documents/myhippoproject/samples', all the new content under that JCR path will go to the development module automatically. You can also add the same module with more than one path, like so:

value: ['repository-data/development:/content/documents/myhippoproject/samples',
'repository-data/development:/content/gallery/myhippoproject/samples']

The full docs for configuration options are available here:


There are some advanced use cases related to config vs content categories, but you shouldn't worry about that unless you have a specific problem with how things get exported.
Reply all
Reply to author
Forward
0 new messages