Modifying node types | Community
Skip to main content
October 16, 2015
Solved

Modifying node types

  • October 16, 2015
  • 4 replies
  • 1860 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by WillMc1

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

4 replies

smacdonald2008
Level 10
October 16, 2015

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.

WillMc1Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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

paul_wmsAuthor
October 16, 2015

"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?

Adobe Employee
October 16, 2015

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