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

1

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?

Nevis answered 12/7, 2015 at 7:36 Comment(1)
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:folderRudiment
F
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.)

Formwork answered 15/7, 2015 at 12:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.