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?
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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With