Expand my Community achievements bar.

SOLVED

Modifying node types

Avatar

Level 1

In prototyping a solution, I need to build a small node type hierarchy and sometimes need to rename a type or move a property from one node type to another.  I'm new to AEM & CRX  and cannot find support for doing this in the documentation.  I imported a couple of node types and would now like to modify them.  I cannot even see how I can delete them so that I can re-import.  Any help would be appreciated.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

Yes there is not a direct way to do this, but lucky for you there is a tool to do this here:

http://localhost:4502/libs/cq/compat/components/ntupgrade.html

For a more detailed explanation you can look here:

http://forums.adobe.com/message/5264677

Hope this helps!

Will

View solution in original post

4 Replies

Avatar

Level 10

You can modify nodes in the AEM JCR using the JCR API. To learn how to work with this API, see http://scottsdigitalcommunity.blogspot.ca/2012/03/programmatically-accessing-day-cq.html?m=0.

Avatar

Correct answer by
Employee

Hi,

Yes there is not a direct way to do this, but lucky for you there is a tool to do this here:

http://localhost:4502/libs/cq/compat/components/ntupgrade.html

For a more detailed explanation you can look here:

http://forums.adobe.com/message/5264677

Hope this helps!

Will

Avatar

Level 1

"For a more detailed explanation you can look here:

http://forums.adobe.com/message/5264677

Hope this helps!"

So, the content of the referenced forum post suggests avoiding defined node types because of their inflexibility.  On the surface, that advice sounds like its aimed at small projects or rapid prototyping efforts in order to save up-front development headaches.  Would the advice hold true for medium-to-large-scale commercial applications being built on this platform?  I.e., where we need high consistency in our nodes in order to build forms and reports?

Avatar

Employee

Good question.

The rule of thumb is to use unstructured data unless you have a good reason to make things more structured using node types or mixins.  In your case where you have a strong requirement for data to be consistent using node types is expected.  I believe the other poster wanted to re-enforce that using node types is by no means required and infact should only be used when needed.

Hope that helps,

Will