On 7/15/08, janandith jayawardena <[EMAIL PROTECTED]> wrote: > Hi, > > How can I use selectors and suffix with <sling:include> tag. you can either replace the selectors by:
<sling:include ... replaceSelectors="foo.bar" /> or add an additional ones by: <sling:include ... addSelectors="foo.bar" /> and set the suffix by: <sling:include ... replaceSuffix="myfile.jpg" /> see [1] for documentation > It's bit confusing , > > Ex: The sling.api page has a table with examples like > "/a/b.s1.s2.html/c/d" saying s1.s2 is a selector and c/d is a suffix. > does means s1 = a/b and s2=c/d such that in a script /a/b can be replaced > with s1 and /c/d replaced with s2. no. '/a/b' is not the script, but the resource path. the 'selectors' are 's1.s2' and the suffix is '/c/d'. the addressed resource is always /a/b and the extension is '.html'. if you wish to use another "script" for the same resource, use the 'resourceType' attribute. eg: <sling:include resourceType="foo/bar" /> regards, toby [1] http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestDispatcherOptions.java?view=markup
