...
These nodes are defined in the application folders, using a JSON format.
Let's examine the definition of /content/david node:
Wiki Markup { "name": "david", "primaryNodeType": "nt:unstructured", "sling:resourceType": "david", "jcr:primaryType": "nt:unstructured" } { "name": "david","primaryNodeType": "nt:unstructured","sling:resourceType": "david","jcr:primaryType": "nt:unstructured" }
Every information stored in these JSON will be a property of the created nodes.
The most important property is the next one
Code Block |
---|
"sling:resourceType": "david"
|
This property defines "david" as resource type, so Sling knows that it will search under the folder /apps/david to find the scripts that will be called on this node.
These JSON files are loaded using the Maven Bundle Plugin , as you can see in the David core/pom.xml file
<!- initial content to be loaded on bundle installation ->
<Sling-Initial-Content>
initial-content;overwrite:=true;uninstall:=true
</Sling-Initial-Content>
Code Block |
---|
<!-- initial content to be loaded on bundle installation -->
<Sling-Initial-Content>
initial-content;overwrite:=true;uninstall:=true
</Sling-Initial-Content>
|
JSON isn't the only way to load initial content. Further informations about content loading can be found in the Content Loading Bundle Documentation gege