How to add custom object and custom metadata | Community
Skip to main content
Level 6
October 16, 2015
Solved

How to add custom object and custom metadata

  • October 16, 2015
  • 11 replies
  • 4309 views

I want to create new object type by extending existing nt:file/nt:folder. Can someone please let me know how can I create my own custom type and custom metadata?

After searching through Google I couldn't find good tutorial on how to do this. I found this thread but could not get much on how to implement new custom type and custom metadata. 

Thank you for your help!

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 JustinEd3

Hi Sam,

In general, extensive use of node types isn't recommended. If you just want a bag of properties, you should use nt:unstructured and create whatever properties you need.

See http://www.quora.com/Repositories/When-using-a-Java-Content-Repository-Apache-JackRabbit-or-Adobe-CRX-for-example-should-you-be-creating-your-own-node-types-or-have-an-unstructured-free-for-all and http://wiki.apache.org/jackrabbit/DavidsModel

The specific scenario you describe, however, does require the use of a custom node type because nt:file and nt:resource are "strong" node types and do not support residual properties. The best thing to do would be to create a mixin node type which defines your properties (or just * to allow any property) and then add that mixin to the nt:resource node (see Rule #6 in David's Model linked to above).

Regards,

Justin

11 replies

Ojjis
Level 7
October 16, 2015

Hello. Are you sure you are not referring to the node types ?

If so, you have the information of how to create/manage you own node types in this article that describes the built in node type administration:
http://dev.day.com/docs/en/crx/current/using_crx/nodetype_administration.html


For information about the custom node types within CQ, see this one:
http://dev.day.com/docs/en/cq/5-4/developing/custom_node_types.html

Regards
Johan