[opencms-dev] Using relative path in OpenCms

Mohit Saxena mohit.saxena at virginamerica.com
Wed Sep 13 23:25:35 CEST 2006


Hi All,

I am trying to use OpenCms to manage the static content of an existing
site. The approach I am taking is to create the static content in
OpenCms environment and then using the static-export functionality to
export out the HTML pages and related resources to a folder in the file
system. 

So far so good but  when I try to use a relative path in html pages to
insert images, OpenCms converts the relative path to an absolute path,
similarly when I try to insert a css file in a template using the
relative path the page rendered by OpenCms converts that path to an
absolute path. Finally when I try and use the exported pages the
absolute paths are not found and the resources are not found (e.g.
../resources/test.css is converted into
/system/modules/com.testcms.www/resources/test.css).

Is there a way to stop OpenCms to convert these relative paths into
absolute path? Anyone any ideas? 

Thanks,
Mohit Saxena
NIIT Technologies
1-650-762-7169



More information about the opencms-dev mailing list