[opencms-dev] The relativeroot property

Alexander Kandzior alex at opencms.org
Thu May 22 16:34:01 CEST 2003


Mark, 
 
the "relativeroot" property feature is currently experimental. It
intended for the link replacement engine rather then the static export. 
 
The use case scenario is difficult to describe, but will try:
*	Image two folders, /one/ and /two/.
*	Now image have some page files /one/a.html and /one/b.html.
*	Then create VFS links from /two/a.html to /one/a.html and from
/two/b.html to /one/b.html so that you have the content of these pages
in one place and re-use it in another place.
*	Problems are caused e.g. by http links in the editable content
of /one/a.html to /one/b.html. The OpenCms link replacement engine will
always make these linke "absolute". Normally, in HTML code of a.html you
would write <a href="b.html">..</a> to link form a to b, but this is
replaced with the absolute path /one/b.html by the engine. No Problem in
the /one/ folder, but in the /two/ folder the linked page a.html will
link to /one/a.html and not to /two/b.html which is usually not what you
want. 
*	'Using the "relativeroot" property set on the /one/ folder you
can tell the link replacer to make all links relative, e.g. if you set
relativeroot to "/one" this prefix will be removed in the http links, in
which case the linked pages in folder "/two" will work as expected. 
Hey I told you it is difficult to describe... and again, this feature is
exerimental.

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com <http://www.alkacon.com/>  
 
 
-----Original Message-----
From: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org] On Behalf Of Mark Miller
Sent: Thursday, May 22, 2003 4:06 PM
To: OpenCMS Mailing List
Subject: [opencms-dev] The relativeroot property


Hello there,
 
My first post to this list so a little shy :-)
 
Can anyone let me know how the relativeroot property works .. I have
tried, but to no avail, to implement it.
I have a project with the following exported structures
 
 
/system/modules/MYMOD/resources/css                           ->
exported to /www/resources/css
/system/modules/MYMOD/resources/images                      -> exported
to /www/resources/images
and
/www/ (html content files)
-> exported to /www/
 
all are statically exported to a /www/ directory. I want to set the
relative root to /www/ so that all links will start off with /www/ being
the root
ie. A html content file should reference an image in resources/images/
and NOT in /www/resources/images/
 
This way I can then copy the contents of the www folder directly to my
web server.
 
Or am I thinking about this in the wrong way ????
 
 
Many thanks in advance,
 
Mark
 
PS. I am very new to CMS in general . so sorry if a silly question
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20030522/580255c9/attachment.htm>


More information about the opencms-dev mailing list