Oh, i just saw that trinidad automatically rewrites the url when using
an absolute path like /icons/foo.png - cool.

 

That solved my problem

 

Felix

 

________________________________

From: Becker, Felix 
Sent: Thursday, January 08, 2009 8:34 AM
To: [email protected]
Subject: Skinning Trinidad - dynamic path in stylesheet files?

 

Hi Guys,

 

i'm using an own css file (defined in the trinidad-skins.xml) for many
of my components. My faces application pages are available on different
paths, e.g. the news page is on /appname/pages/news/news.jsf and the
login page is on /appname/pages/security/login/login.jsf. In my
style.css file I want to use the background-image attribute: 

 

For example: 

       background-image:url('successicon.png'); 

 

The problem is that the path of the successicon.png can't be defined
absolutely because /appname/ often changes (my application has many
modules). So I can't use
background-image:url('/someappname/icons/successicon.png');. Using a
relative path doesn't work for me because the current destination is
always different (see news and login page) - so something like
background-image:url('../../successicon.png'); doesn't work. I don't
want to use the <tr:image> tag or something like this because I want to
have different images on different styles.

 

Do you know a way how to solve this problem?

 

Thank you and best regards

 

Felix 

Reply via email to