rocasespino
rocasespino

Reputation: 21

How can be changed a documenttype layout in Hippo CMS

I created a hippo documenttype using a one column layout. For rendering purposes I would like to reorganize the given items into a two-columns layout.

However, no option is available to do this change, at least not by using the latest hippo cms community version.

I have already searched in google and found following information, saying that it may be possible to change the layout by using the console, but no information about how:

http://hippo.2275632.n2.nabble.com/How-to-delete-or-rename-document-types-td7579269.html

I would appreciate any hints about it.

Upvotes: 1

Views: 432

Answers (2)

Olivier Bourgeois
Olivier Bourgeois

Reputation: 101

AFAIK there is no documentation on how to do this: this is not very complicated but this is a tedious process. If you still can - for instance your document type is not used yet - I would advise to simply drop it and recreate the content type. That being said, here is how it works:

  • look into your project namespace in the console: the path is something like this: /hippo:namespaces/YOURPROJECT/document-type/editor:templates/_default_/root
  • the root nodes defines the layout. Check out the plugin.class: for a one column this will be org.hippoecm.frontend.service.render.ListViewPlugin and for a 2 column layout the plugin.class will be org.hippoecm.frontend.editor.layout.TwoColumn
  • for every field in your document type (that's the tedious part) you will need to define if the field placed on the right or the left.
  • this is configured on the node with the name of the field path, as a property wicket.id that for instance have the value ${cluster.id}.left.item. This means the item will be placed on the left side.

Your best bet is to create a 2 column example document type and look carefully at its configuration and replicate the changes in your existing field.

Upvotes: 1

Anoop Gangadharan
Anoop Gangadharan

Reputation: 158

Have you tried the instructions on the link below ? http://www.onehippo.org/library/concepts/document-types/custom-editor-layout.html

Upvotes: 0

Related Questions