[opencms-dev] CSS and link problems with static export

David Booker david_booker at excite.com
Wed Dec 3 23:42:01 CET 2003


After publishing a normal page (static export on) that has my own template and css applied (both within a module I created, and published), the link to the css in the page's html points to an internal opencms address (opencms/opencms/system/modules/......) that which corresponds to the relative address I gave in my master template. So naturally the exported pages can't find the css. How can I force the css to export correctly? (the css for the default templates can also not be found when I use such templates and then publish).

The report I get when publishing a page looks like this:
Publishing resource ...
Publishing /test/page3.htm
Publishing /system/bodies/test/page3.htm
Static export, number of starting links is: 2
Exporting /test/page3.htm
Skipping /system/bodies/test/page3.htm
Skipping /system/modules/cochrane/resources/cclev3.css
... static export finished
Checking filesystem links ...
.. filesystem link check finished
... the resource has been published 

More details: The static files are served directly by Apache. OpenCMS is installed inside Tomcat, but the exported files are only served by Apache. 

Does this have something to do with getLinkSubstitution? If so, how do I use it?

I think it might, because when I make a regular 'horrizontal' link in the WYSWYG editor (link to another file in the same directory), I get a bad link error when publishing, and the link in the exported resource has file:///opencms/export/test/ added to the link address (where /test/ is the directory of the files). Or should setting relativelinks_in_export=true fix some of the problem? 

Also, the publishing process seems to have added directories opencms/export/resources within my export  target directory, but without any resources in the directories.

The stylesheet link in the exported html pages lacks a critical rel="stylesheet" attribute in the link tag for the css. Why is this? Without it, browsers don't know it's a stylesheet, and can't work!

My temporary fix has been to add in the rel="stylesheet" attribute and give an http address for a copy of the stylesheet in the jsp template. But Internet Explorer doesn't seem to be able to read CSS style sheets linked with an http address, only Netscape can..... So I'm still stuck. Suggestions?

-Dave Booker, somewhere in foggy Germany


_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



More information about the opencms-dev mailing list