David uses the following opensource library/technologies:
- jQuery 1.4.2
- jQueryUI 1.8
- LavaLamp - A menu plugin for jQuery with cool hover effects
- WP-Cumulus SWF - used to display tag cloud
Node creation is a simple task, but you must understand how you can render the information stored in the nodes using Sling.
The first document you can read is the next one: http://dev.day.com/content/ddc/blog/2008/07/cheatsheet/_jcr_content/par/download/file.res/cheatsheet.pdf
It . It simply describes how content resolution works in Sling.
So we loaded these two scripts in new.esp. In addition to this, in this script we defined a simple form, with some input text texts and a CKEditor panel.
Once the user fills the input, the page is like in the following image
If the resource doesn't exist, a new item is created. If the resource name ends with /* or /, the name of the item will be created using an algorith that also uses the name of new node. The creation of the new node goes through the SlingPostServlet , a frontend for the content manipulation. This servlet provides also other content operations, as described here.
In the HTTP POST request there are also some others fields:
- sling:resourceType=david : This information is stored on the new node, so when we will retrieve this node from the browser, using any extension (for example .article provided by /apps/david/article.esp ) Sling will search under the folder /apps/david.
- jcr:mixinTypes=mix:referenceable : Another information that will be stored. In that way this node can be referenceable. This feature will be useful for the tags management.
You can submit new entry only if you have already authenticated with Sling. So you can see that on the /apps/david/menu.esp script there is a check for the credentials