Page 1 of 1

[solved] htmlExport - no stylesheet images

Posted: Wed Sep 26, 2007 11:38 pm
by Jonny
Anyone using htmlExport?

I'm finding that images specified in stylesheets are not being loaded.

Have tested with the CMSMS root at different levels and tried tweaking the image URLs in the exported stylesheets.

Could be useful for speeding up sites which aren't often updated.

If the Firefox Edit CSS extension is activated the images appear, and vanish again when it's closed. Possible clue?

Re: htmlExport - no stylesheet images

Posted: Thu Sep 27, 2007 12:02 pm
by Pierre M.
I have not tried htmlExport.
Have you seen the recent thread on mirroring wit wget ? Do you think the images in stylesheet aren't being mirrored ?

Pierre M.

Re: htmlExport - no stylesheet images

Posted: Thu Sep 27, 2007 1:28 pm
by Jonny
I must have been editing the wrong stylesheet when I tested for alternative URL paths.

Making image URL paths relative by adding ../ displays them correctly. For example:

.background { background-image: url(../path/to/images/image.jpg); }

htmlExports creates the stylesheet in cmsms_root/stylesheet/ and the html in cmsms_root/html

I guess htmlExport needs to be tweaked to add relative paths to image declarations.

Re: htmlExport - no stylesheet images

Posted: Thu Sep 27, 2007 1:35 pm
by Pierre M.
Jonny wrote: Making image URL paths relative by adding ../ displays them correctly.
Correct, this is the CSS specification.
Pierre

Re: htmlExport - no stylesheet images

Posted: Thu Sep 27, 2007 4:22 pm
by Jonny
With relative paths the images won't be displayed in unexported pages.

Will have to go with absolute http://www etc. paths in the original stylesheets.

One final point: if htmlExport's auto export option is switched on, Edit Page preview windows are blank.