8

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?

Jezwin Varghese
  • 314
  • 2
  • 16
Finn
  • 912
  • 1
  • 16
  • 53
  • to change nt:folder to sling:folder once can do the following (just posting it here because I struggled.a bit with this) Goto folder properties and change it to "orderable". this will change the the primaryType from nt:folder to sling:orderedFolder. you can uncheck this again to the make primaryType to sling:folder – ShAkKiR Jun 23 '23 at 11:03

1 Answers1

11
  • 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.)

anotherdave
  • 6,656
  • 4
  • 34
  • 65