On 5/15/07, Phillip Rhodes <[EMAIL PROTECTED]> wrote:
Hi.

I migrated my custom folder node to use a nt:folder, which only allows children 
of type nt:file...

Unfortunately, there are properties that I need to store on the nt:file node 
that are not defined.  For example, I need to store a display name property, 
and a caption (if the nt:file is an image), description and other miscellaneous 
information.

Can someone provide some direction on how I can extend nt:file to store these 
additional properties?

there are many ways to achieve this, for example you could use a
custom node type that extends from nt:file, e.g.

[myapp:foo] > nt:file
 - myapp:caption (string)
 - myapp:description (string)

you could create a custom node type that extends from nt:resource and
use that node type for the jcr:content child node of nt:folder, e.g.

[myapp:foo] > nt:resource
 - myapp:caption (string)
 - myapp:description (string)

you could create a custom mixin type and assign this mixin ad hoc where
necessary, e.g.

[myapp:foo]
 mixin
 - myapp:caption (string)
 - myapp:description (string)


cheers
stefan


Thanks!




Reply via email to