On Fri, Jul 18, 2008 at 10:18 AM, Paul Noden <[EMAIL PROTECTED]> wrote:

> ...Bertrand - how would you include different resources into your script,
> and should I be using "resource" whenever I have used "nodes"? I
> noticed I have managed to use both in a similar context... sorry....

In most cases, a Sling Resource wraps a Node, but there are other
types of Resources (Property, synthetic, etc.) which are used less
often.

The b-b.jsp test script [1] used by the SLING457Test shows how to
include another resource in the output of your script:

<sling:include path="./image.foo.html" resourceType="<%= resType %>" />

In this case it is forcing image.foo.html to be rendered with a
specific resource type, kind of like a typecast in Java. Omitting the
resourceType attribute will use the resource's normal type for
rendering.

-Bertrand

[1] 
http://svn.eu.apache.org/repos/asf/incubator/sling/trunk/launchpad/webapp/src/test/resources/integration-test/issues/sling457/b-b.jsp

Reply via email to