Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between nt:folder, sling:folder & sling:orderedfolder in AEM?

Tags:

aem

I want to know what if is difference between nt:folder, sling:folder & sling:orderedfolder in AEM/CQ?

Also what are cases to use each of these while implementation?

like image 958
Finn Avatar asked Jul 12 '15 07:07

Finn


Video Answer


1 Answers

  • nt:folder can be used as a "vanilla" folder node in the JCR

  • Using a sling:folder allows the folders children to be interpreted using their sling:resourceType — e.g. if you had a node "bar" at /etc/designs/foo/bar, setting the resource type of "foo" to a sling:Folder allows you to resolve bar using its resource type via a script (just like with components), whereas if "foo" were an nt:folder this wouldn't be possible (it would just be treated statically).

  • sling:OrderedFolder can be used when ordering is important, e.g. in the /etc/map directory, if you want your entries to be used in order rather than randomly, the ordered folder provides this option. (For most cases, it's not really needed.)

like image 97
anotherdave Avatar answered Nov 09 '22 01:11

anotherdave