[opencms-dev] Static export / relative links

Filip Kratochvil filip.kratochvil at nelasoft.cz
Sun May 31 13:23:14 CEST 2015


Hi,

 

next episode of "static export story":

 

-          we need staticaly export complete site with relative links

-          opencms-importexport.xml setting is right

<userelativelinks>true</userelativelinks>

 

But we have a problem - relative paths in the expoted (container) pages are
wrong calculated.

 

Example

 

1.
http://domain/opencms/export/sites/default/tutorial/step-1-modify-a-page/

all links on the page are wrong (logo example):
../../../../../system/modules/com.alkacon.bootstrap.formatters/resources/img
/logo/logo_opencms_png24.png_1704647694.png

 

2.
http://domain/opencms/export/sites/default/tutorial/step-1-modify-a-page/xxx
/ (same page, copy of the first page)
all links on the page are right (logo example):

../../../../../system/modules/com.alkacon.bootstrap.formatters/resources/img
/logo/logo_opencms_png24.png_1704647694.png

 

As you can see, pages have a different "navigation level" (second page is
subpage of the first page). But relative links are same for both pages, so
it makes a problem for one of them (first page).I think links should depends
on page which is actually requested.

 

Right link in the first example should have one level (../) less in path:

../../../../system/modules/com.alkacon.bootstrap.formatters/resources/img/lo
go/logo_opencms_png24.png_1704647694.png

 

Is there any problem with function or i missed some configuration? Thank you
very much.

 

--
Regards
Filip Kratochvil
------------------------------------------------
NELASOFT Technologies, s.r.o.
E-mail:  <mailto:filip.kratochvil at nelasoft.cz> filip.kratochvil at nelasoft.cz
Web:  <http://www.nelasoft.cz/> www.nelasoft.cz

Twitter:  <https://twitter.com/NELASOFT> @NELASOFT

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150531/6efa798f/attachment.htm>


More information about the opencms-dev mailing list