[opencms-dev] Static Export & "External Links" (Pointers)
Arash Kaffamanesh
arash.kaffamanesh at pomegranate.de
Mon Jan 9 19:07:50 CET 2006
Hi
You can use siblings and external links shall be used normaly for
external links, not internal links.
Anyway:
>> exportname=/
I'm not sure if this settings is correct: I use in one of my static
opencms projects
exportname=cms
And the exported files can be found under:
webapps/opencms/portal
And I use:
<exportpath>portal</exportpath>
<userelativelinks>true</userelativelinks>
My static settings look like this:
<staticexporthandler>org.opencms.staticexport.CmsOnDemandStaticExportHan
dler</staticexporthandler>
<exportpath>portal</exportpath>
<defaultpropertyvalue>false</defaultpropertyvalue>
<defaultsuffixes>
<suffix key=".jpg"/>
<suffix key=".gif"/>
<suffix key=".png"/>
<suffix key=".doc"/>
<suffix key=".xls"/>
<suffix key=".ppt"/>
<suffix key=".pdf"/>
<suffix key=".txt"/>
<suffix key=".css"/>
<suffix key=".zip"/>
<suffix key=".swf"/>
</defaultsuffixes>
<rendersettings>
<rfs-prefix>${CONTEXT_NAME}/portal</rfs-prefix>
<vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix>
<userelativelinks>true</userelativelinks>
<exporturl>http://127.0.0.1:8080${CONTEXT_NAME}/handle404</exporturl>
<plainoptimization>true</plainoptimization>
<testresource uri="/system/shared/page.dtd"/>
<resourcestorender>
<regex>/sites/internet/.*</regex>
<regex>/system/modules/com.customer.frontend/.*</regex>
</resourcestorender>
</rendersettings>
See also this tutorial:
http://mail.opencms.org/pipermail/opencms-dev/2005q4/021164.html
HTH,
Kind Regards,
Arash
--
http://www.pomegranate.de
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Brabenetz, Harald
Sent: Montag, 9. Januar 2006 16:58
To: opencms-dev at opencms.org
Cc: briesgo at sgi.es; jeff.white at jvolution.co.uk; ptorrodellas at fihoca.com
Subject: [opencms-dev] Static Export & "External Links" (Pointers)
Hello together,
I´m working with OpenCms 6.0.2 and run into a problem with the Static
Export & "External Links" (Pointers).
Explanation:
I wanted to forward from /sites/default/index.html to
/sites/default/overview/index.html
So I created an "external Link" (/sites/default/index.html) with a
Link-URL="./overview/index.html".
But it didn´t work with the static export:
The LinkManager genarated a link like
/OpenCms/OpenCms/sites/default/overview/index.html
But the site is located in /OpenCms/OpenCms/overview/index.html
Properties of /sites/default/ :
export=true
exportname=/
Please confirm wheather this is the correct solution or not:
After some time I thought there might be a bug in
CmsStaticExportManager.export(...)
I added one line (Line 430) and the Export worked fine!
Code:
......
......
......
409 CmsContextInfo contextInfo = new CmsContextInfo(
410 cms.getRequestContext().currentUser(),
411 cms.getRequestContext().currentProject(),
412 vfsName,
413 "/",
414 i18nInfo.getLocale(),
415 i18nInfo.getEncoding(),
416 remoteAddr);
417
418 cms = OpenCms.initCmsObject(null, contextInfo);
419
420 if (siteRoot != null) {
421 vfsName = vfsName.substring(siteRoot.length());
422 } else {
423 siteRoot = "/";
424 }
425
426 if (LOG.isDebugEnabled()) {
427
LOG.debug(Messages.get().key(Messages.LOG_STATIC_EXPORT_SITE_ROOT_2,
siteRoot, vfsName));
428 }
429 cms.getRequestContext().setSiteRoot(siteRoot);
430 cms.getRequestContext().setUri(vfsName); //New Line from
brabenetz 2005-12-05
431
432 String oldUri = null;
433
434 // this flag signals if the export method is used for "on
demand" or "after publish".
435 // if no request and result stream are available, it was
called during "export on publish"
436 boolean exportOnDemand = ((req != null) && (res != null));
......
......
......
see also: http://www.opencms-forum.de/viewtopic.php?t=1289
Thanks for your reply anyway
There are maybe simlar problems in following mails:
Jeff White jeff.white at jvolution.co.uk
Mon Dec 19 11:54:42 CET 2005
http://lists.opencms.org/pipermail/opencms-dev/2005q4/021379.html
Pere Torrodellas ptorrodellas at fihoca.com
Fri Dec 16 17:53:26 CET 2005
http://lists.opencms.org/pipermail/opencms-dev/2005q4/021339.html
Borja Riesgo Juan briesgo at sgi.es
Thu Dec 15 19:42:38 CET 2005
http://lists.opencms.org/pipermail/opencms-dev/2005q4/021311.html
Cheers
Harald
Harald Brabenetz | Senior Consultant | BearingPoint | A-8141 Graz |
Seering 6 | Phone +43 - (0)316 - 8003 - 1250
<mailto:harald.brabenetz at bearingpoint.com> |
<http://www.bearingpoint.de>
************************************************************************
***************************
The information in this email is confidential and may be legally
privileged. Access to this email by anyone other than the intended
addressee is unauthorized. If you are not the intended recipient of
this message, any review, disclosure, copying, distribution, retention,
or any action taken or omitted to be taken in reliance on it is
prohibited and may be unlawful. If you are not the intended recipient,
please reply to or forward a copy of this message to the sender and
delete the message, any attachments, and any copies thereof from your
system.
************************************************************************
***************************
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please
visit http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list