Hi,

Am 07.11.2011 um 22:24 schrieb JCR:

> Hi,
> 
> I recently noticed on Lars' cheatsheet 
> (http://dev.day.com/docs/en/cq/current/developing/sling_cheatsheet.html), 
> step 
> # 3, the term "Last resort".
> 
> I'd interpret this as possibility to attach specific code to a given 
> nodetype, i.e. scripts, or perhaps even bundles, could be linked to a 
> Nodetype. Now, I didn't find documentation on this specific topic.
> 
> So, my questions are:
> It above assumption correct? If yes, where would I need to place the 
> code so it gets recognized by Sling to belong to nodetype X?

I do not exactly understand what you mean by "belong to nodetype X"...

The point in Lars' cheatsheet is that it is about getting the resource type of 
a JCR node based resource. Usually this is defined by the sling:resourceType 
property. Sometimes nodes don't have an explicit property and so we have 
defined some fallback mechanisms to make sure we always have a reasonable 
resource type. And so we said that ultimately the primary node type is used.

The most prominent example of using this fallback are nt:file nodes.

Hope this helps.

Regards
Felix

> 
> Thanks Pros,
> Juerg

Reply via email to