You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Johannes Schaefer <jo...@uidesign.de> on 2005/12/20 16:52:50 UTC

use of images in extra-css

Hi!

I'd like to insert something like this into skinconf.xml

<extra-css>
  div#top { background-image:url('images/top.png'); }
</extra-css>

But I can't locate the place to put top.png.
The path 'image/top.png' obviously doesn't get resolved like
in the XML files.

Thanks
Johannes


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 *
D-81825 München
www.uidesign.de

Buch "User Interface Tuning" von Joachim Machate & Michael Burmester
www.user-interface-tuning.de

Re: use of images in extra-css

Posted by Ross Gardler <rg...@apache.org>.
Johannes Schaefer wrote:
> Hi!
> 
> I'd like to insert something like this into skinconf.xml
> 
> <extra-css>
>   div#top { background-image:url('images/top.png'); }
> </extra-css>
> 
> But I can't locate the place to put top.png.
> The path 'image/top.png' obviously doesn't get resolved like
> in the XML files.

I'm not sure of the answer, but I can help find out...

How does it get resolved?

You can find out by looking in PROJECT_HOME/webapp/WEB-INF/logs/error.log

Ross

Re: use of images in extra-css

Posted by Helena Edelson <he...@greenjaguar.com>.
I'm not the one who should answer this but if you haven't mapped your 
images directory in forrest.properties,
which would tell forrest/cocoon to find top.png in content/images or 
xdocs/images, wherever you put it, then it
seems to look for it in your FORREST_HOME/..../webapps/ images. a local 
path like this:
apache-forrest-0.7/main/webapp/skins/pelt/images

helena

Johannes Schaefer wrote:

>Hi!
>
>I'd like to insert something like this into skinconf.xml
>
><extra-css>
>  div#top { background-image:url('images/top.png'); }
></extra-css>
>
>But I can't locate the place to put top.png.
>The path 'image/top.png' obviously doesn't get resolved like
>in the XML files.
>
>Thanks
>Johannes
>
>
>  
>

Re: use of images in extra-css

Posted by Johannes Schaefer <jo...@uidesign.de>.

David Crossley schrieb:
> Johannes Schaefer wrote:
> 
>>Ross, error.log is suspiciously empty.
>>Firefox (page info) gives
>>  http://localhost:8888/skin/images/top.png
>>as location for url('images/top.png').
>>
>>Helena is right, I forgot to mention where I put the image:
>>  It is below src\documentation\resources\images\
> 
> 
> That is the formal location.
> 
> Did you try the old location:
>  src\documentation\content\xdocs\images\

No, I'm happy with the formal one: We make heavy use of PDF
output and this seems to be the only place that works.

I am always confused where to put the images: the resources
folder seems the right place to me but the forrest docs
mention the "old" location:
  http://forrest.apache.org/docs_0_70/your-project.html#images

The question here was rather on how to address images from (extra)
CSS since the URLs there don't get resolved like in XML source.
Since the absolute path works, I'm fine.

Johannes

> 
> -David
> 
> 
>>Thorsten's right:
>>The absolute path url('/images/top.png') gets resolved to
>>  http://localhost:8888/images/top.png
>>which displays properly.
>>
>>I just need to understand, still ;-)
>>
>>>>Thanks
>>>>Johannes
> 
> 


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 *
D-81825 München
www.uidesign.de

Buch "User Interface Tuning" von Joachim Machate & Michael Burmester
www.user-interface-tuning.de

Re: use of images in extra-css

Posted by David Crossley <cr...@apache.org>.
Johannes Schaefer wrote:
> Ross, error.log is suspiciously empty.
> Firefox (page info) gives
>   http://localhost:8888/skin/images/top.png
> as location for url('images/top.png').
> 
> Helena is right, I forgot to mention where I put the image:
>   It is below src\documentation\resources\images\

That is the formal location.

Did you try the old location:
 src\documentation\content\xdocs\images\

-David

> Thorsten's right:
> The absolute path url('/images/top.png') gets resolved to
>   http://localhost:8888/images/top.png
> which displays properly.
> 
> I just need to understand, still ;-)
> > 
> >>Thanks
> >>Johannes

Re: use of images in extra-css

Posted by Johannes Schaefer <jo...@uidesign.de>.
Ross, error.log is suspiciously empty.
Firefox (page info) gives
  http://localhost:8888/skin/images/top.png
as location for url('images/top.png').

Helena is right, I forgot to mention where I put the image:
  It is below src\documentation\resources\images\

Thorsten's right:
The absolute path url('/images/top.png') gets resolved to
  http://localhost:8888/images/top.png
which displays properly.

I just need to understand, still ;-)

Thanks a lot!
Johannes


Thorsten Scherler schrieb:
> El mar, 20-12-2005 a las 16:52 +0100, Johannes Schaefer escribió:
> 
>>Hi!
>>
>>I'd like to insert something like this into skinconf.xml
>>
>><extra-css>
>>  div#top { background-image:url('images/top.png'); }
>></extra-css>
>>
>>But I can't locate the place to put top.png.
>>The path 'image/top.png' obviously doesn't get resolved like
>>in the XML files.
>>
> 
> 
> The place other already gave an answer, now how the url should look like
> since a relative "images/top.png" will probably not resolved should look
> like "/images/top.png". 
> 
> This way it will always resolved against the root of the webapp. You
> cannot use {$root}images/top.png which actually would be the right one.
> 
> HTH
> 
> salu2
> 
> 
> 
>>Thanks
>>Johannes
>>
>>


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 *
D-81825 München
www.uidesign.de

Buch "User Interface Tuning" von Joachim Machate & Michael Burmester
www.user-interface-tuning.de

Re: use of images in extra-css

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 20-12-2005 a las 16:52 +0100, Johannes Schaefer escribió:
> Hi!
> 
> I'd like to insert something like this into skinconf.xml
> 
> <extra-css>
>   div#top { background-image:url('images/top.png'); }
> </extra-css>
> 
> But I can't locate the place to put top.png.
> The path 'image/top.png' obviously doesn't get resolved like
> in the XML files.
> 

The place other already gave an answer, now how the url should look like
since a relative "images/top.png" will probably not resolved should look
like "/images/top.png". 

This way it will always resolved against the root of the webapp. You
cannot use {$root}images/top.png which actually would be the right one.

HTH

salu2


> Thanks
> Johannes
> 
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)