You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Xavier Ottolini <xa...@qualipse.fr> on 2003/02/07 15:29:58 UTC

Path to resources and skin

Hi !

In a turbine 2.1 application , I try to dispay images located in the 
skins folders .

My images are in the folder : <webapp 
root>/resources/ui/skins/default/images/

When I call getURI(java.lang.String pathToContent), it returns a URI 
pointing to the given content (where content is a path relative to the 
webapp root).

How can I find the skin folder ?

Thanks in advance,

Xavier




---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Path to resources and skin

Posted by Xavier Ottolini <xa...@qualipse.fr>.
Thanks Eric,

And if the user chooses to select a different skin, it is possible to 
get the name of the skin :

I discoved the class "UIManager" with the method getSkin(), getImage(), 
getStylecss($data)
In the template, it is used like that :
$ui.getImage("myimage.gif")

I tried it but the browser displays '$ui.getImage("myimage.gif")'. I 
think that the UIManager is disabled when 
services.VelocityService.default.layout is set to VelocityOnlyLayout in 
the TR.properties.

Xavier

Eric Emminger wrote:

>Xavier
>
>  
>
>>My images are in the folder : <webapp 
>>root>/resources/ui/skins/default/images/
>>
>>When I call getURI(java.lang.String pathToContent), it returns a URI 
>>pointing to the given content (where content is a path relative to the 
>>webapp root).
>>
>>How can I find the skin folder ?
>>    
>>
>
>Try using the following in a Velocity template.
>
>$content.getURI("resources/ui/skins/default/images/")
>
>Eric
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Path to resources and skin

Posted by Eric Emminger <er...@ericemminger.com>.
Xavier

> My images are in the folder : <webapp 
> root>/resources/ui/skins/default/images/
> 
> When I call getURI(java.lang.String pathToContent), it returns a URI 
> pointing to the given content (where content is a path relative to the 
> webapp root).
> 
> How can I find the skin folder ?

Try using the following in a Velocity template.

$content.getURI("resources/ui/skins/default/images/")

Eric

-- 
Eric Emminger
eric@ericemminger.com


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org