You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk> on 2004/11/08 20:45:03 UTC
Re: skins and images
Regarding the skinning (of cats?) there was a discussion a while ago.
Search the mailing-list archives (or use Google).
-Filip
J wrote:
> Wonderful... the more I learn about this framework the
> more I like it. Thanks Filip.
>
> On a related note, is there a best practice for doing
> different skins for images?
>
> For example, could I have images/skin1/titleMain.png
> and images/skin2/titleMain.png?, with 1 asset that
> references them both depending on the setting? Or do
> I need to do multiple assets for that, or are the
> images normally grouped in the same directory with a
> different suffix/prefix for the different skins?
>
> Jason
>
> --- "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>
> wrote:
>
>
>>It seems that you've missed some very basic
>>functionality here: If you
>>declare context-assets, they'll be localized
>>automatically. That is:
>>
>> <context-asset name="title_Main"
>>path="images/titleMain.png" />
>>
>>would resolve to any of "images/titleMain_en.png",
>>"images/titleMain_fr.png" or whatever matches the
>>current locale
>>according to the rules set forth in the Java I18N
>>spec - or something
>>like that. At least it works for me.
>>
>>So, you really don't need all those assets -
>>Tapestry will take care of
>>those for you! Yet another reason to loooove this
>>framework.
>>
>>-Filip
>>
>>J wrote:
>>
>>>Hello All,
>>>
>>>I'm new to Tapestry and still learning. I've
>>
>>seached
>>
>>>gmane and couldn't find whether this was possible
>>
>>or
>>
>>>not. I'd like to localize some images by having a
>>>variable path for the asset rather than doing a
>>
>>bunch
>>
>>>of asset names, for example do something like:
>>>
>>> <context-asset name="title_Main" path="images/"
>>
>>+
>>
>>>@imagesPath + "/titleMain.png"/>
>>>
>>>where @imagesPath can resolve to "imagesEnglish"
>>
>>or
>>
>>>"imagesFrench"
>>>
>>>Rather than doing something like:
>>>
>>> <context-asset name="title_Main_en"
>>>path="images/imagesEnlish/titleMain.png"/>
>>> <context-asset name="title_Main_fr"
>>>path="images/imagesFrench/titleMain.png"/>
>>>
>>>and getting the right image by picking the right
>>
>>name,
>>
>>>as this way every time a new language is added we
>>
>>need
>>
>>>to go through and add additional asset names for
>>
>>every
>>
>>>localized image.
>>>
>>>Q: is there a way to access an instance variable
>>
>>or a
>>
>>>method from .jwd or .pages?
>
> [snip]
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>