On Feb 19, 2009, at 4:55 PM, Sergiu Dumitriu wrote:

> Vincent Massol wrote:
>> On Feb 19, 2009, at 4:28 PM, Dan Miron wrote:
>>
>>> I could go on with {{icon name="arrow_out"//}} but this means that  
>>> the
>>> extension will be assumed as ".gif"
>>
>> IMO the mapping between names and resources is the role of the macro
>> itself, so it can have a map to do whatever mapping it needs. Of
>> course it means users cannot add new resources without changing the
>> macro but I think simplicity is better than genericity here in this
>> case. We could make it generic too by doing the following:
>>
>> * Create a {{image}} macro that takes a "location" parameter. This
>> location is relative to the resources directory in the webapp. For
>> example:
>>
>> {{image location="icons/silk/arrow_out.gif"/}}
>>
>> * Create a {{icon}} macro that extends the image macro but only  
>> offers
>> a "name" parameter. This macro will do the mapping between names and
>> image resources.
>>
>> WDYT?
>>
>
> -0.5, since this kind of location is VERY hardcoded, thus hard to
> migrate if we decide to reorganize directories.

Yes true.  We have an  api to get resources inside the resources/ dir  
but it's an internal api and it should stay internal.

I agree that it's a bit too open and thus dangerous. I thus remove  
this proposal.

Thanks
-Vincent
http://xwiki.com
http://xwiki.org
http://massol.net






_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to