Ah, Thank you. I see.

I hope sling:alias could be String[]. Even if I set sling:alias =
{png, gif, tiff}.. only the first entry, png, is used.

For example,
/some/path/jpeg (sling:alias = {png, gif, tiff})

then,
GET /some/path/jpeg.json  ==> good
GET /some/path/png.json  ==> good
GET /some/path/gif.json     ==> bad
GET /some/path/tiff.json    ==> bad

I ended up writing /etc/map config to redirect stuff to
/some/path/jpeg (according to
http://sling.apache.org/site/mappings-for-resource-resolution.html)

I tried mix:shareable .. it was a nightmare since I did not back up
the node before setting mixin.. And it's impossible to remove
mix:shareable mixin :P

SLING-1778 looks promising. I can't apply patches. I'm using Day CQ
and have to wait until they apply the patch to the sling they ship
with.

Thanks.
Sam

On Wed, Nov 3, 2010 at 10:02 AM, Justin Edelson
<jus...@justinedelson.com> wrote:
> Hi...
>
> sling:alias only works within the same path segment, i.e. if
>
> /some/path/j...@sling:alias = jpg
>
> then you could request either /some/path/jpeg or /some/path/jpg and
> get the resource at /some/path/jpeg.
>
> JCR 2 Shareable Nodes might be a solution for you. Or take a look at 
> SLING-1778.
>
> Justin
>
>
> On Tue, Nov 2, 2010 at 4:07 PM, sam lee <skyn...@gmail.com> wrote:
>> Hey,
>>
>> I want:
>> GET /some/path/jpeg.tidy.infinity.json
>>
>> to be equivalent to:
>> GET /some/other/path/foo.tidy.infinity.json
>>
>> I tried:
>> /some/path/jpeg/sling:resourceType = /some/other/path/foo
>> and
>> /some/path/jpeg/sling:resourceSuperType = /some/other/path/foo
>>
>> but, the json returned by
>> GET /some/path/jpeg.tidy.infinity.json
>> is not same as the json returned by
>> GET /some/other/path/foo.tidy.inifinity.json
>>
>> Should I use something other than sling:resourceType ?
>> sling:alias?
>>
>> Thanks.
>> Sam
>>
>

Reply via email to