Expand my Community achievements bar.

SOLVED

Sling:folder Vs nt:folder

Avatar

Level 4

Hello there,

From this URL http://localhost:4502/crx/explorer/nodetypes/index.jsp

Child Node definition of nt:folder says nt:folder  shall contain nt:folder as child node.

Child Node definition of sling:folder says sling:folder shall contain sling:folder or nt:folder as child node

If it so. I can see sling:folder inside the nt:folder:

Here is the example:/libs/foundation/components/search/i18n

Here root(/) is nt:folder

libs: node type is nt:folder

i18n folder is sling:folder.

Can any one help me to understand this.

Thanks

Nanda

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Defining the node of type sling:folder gives you additional capabilities of defining sling characteristics on that node like binding a script, defining a resource type etc that you don't get with nt:folder.

One such example with OOTB components is form action component /libs/foundation/components/account/actions/accountrequest  this node too is of type sling:folder there you can see sling:resourceType defined along with POST script which comes into play in form submit action.

- Runal

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Defining the node of type sling:folder gives you additional capabilities of defining sling characteristics on that node like binding a script, defining a resource type etc that you don't get with nt:folder.

One such example with OOTB components is form action component /libs/foundation/components/account/actions/accountrequest  this node too is of type sling:folder there you can see sling:resourceType defined along with POST script which comes into play in form submit action.

- Runal

Avatar

Community Advisor

I could find one very old reference forum post that more or less explains the difference between sling:folder and nt:folder

https://forums.adobe.com/thread/984113#expires_in=86399986&token_type=bearer&access_token=eyJhbGciOi...

- Runal