[opencms-dev] Links modification during page saving

Sergey Sadovnikov flex_ferrum at artberg.ru
Wed Sep 10 12:13:14 CEST 2008


Hello.

This is the repost of my request from the 1.08.08. Could somebody
explain me - how to solve this problem?

-----------------------------------------------------------------

I know what this question perhaps very popular but I can not find out
an answer in the documentation, this mailing list or forum at
www.opencms-forum.de.

I have following site structure:

sites
  default <--- here is the my site
     Downloads |
     Support   | <--- site subfolders
     Products  |
  demo    <--- here is old 'default' content
system
  ...

When I try to insert internal link into any resource within
/sites/default, link becomes broken. For example, I am editing
index.html in /sites/default/Products folder and want to place link
to /sites/default/Support/index.html. When link just inserted it looks
like /Support/index.html. When I save file first time link became
/sites/default/Support/index.html. After second save link looks like
/sites/default/sites/default/Support/index.html. And so on. After each
save /site/default appends before url. So when I view this resource
in the browser link is broken (looks like
http://localhost:8080/opencms/opencms/sites/default/sites/default/Support/index.html).

I found one solution - set 'userelativelinks' option from file
opencms-importexport.xml to true and edit page in the root scope (i.
e. select '/' as site in the explorer). But this solution is not
comfortable for me and my customer because of switching between '/'
site and '/sites/default' site each time before and after editing is
not good idea.

Is there another more comfortable solution? What I have to do to
avoid links breaking when I edit resources in /sites/default scope?

-- 
Best Regards,
 Sergey                          mailto:flex_ferrum at artberg.ru







More information about the opencms-dev mailing list