[opencms-dev] cms:link issue in offline project

Mario Jäger m.jaeger at alkacon.com
Mon Jan 25 11:49:13 CET 2010


Hi Xabi,

Links in the offline and in the online project may differ. In the offline project the VFS resources are 
linked. If you use the org.opencms.staticexport.CmsOnDemandStaticExportHandler, in the online project is 
checked if the linked resource has to be exported. If the resource has to be exported, than the the export 
path is linked, otherwise the VFS resource is linked. 

You write that your link in the offline project does not work. What does it mean? Is there no link created
or is there an error when you follow the link?

-- 
Kind Regards,
Mario.
 
-------------------
Mario Jäger
 
Alkacon Software GmbH  - The OpenCms Experts                    
http://www.alkacon.com - http://www.opencms.org


Legasa Xabier schrieb:
>
> Hello,
>
> Ive a problem with <cms:link> tag. This code:
>
> *<cms:link>*/myDocuments/whatever.doc*</cms:link>* or this other (same 
> behaviour I believe): 
> out.println(*actionElement.link*("/myDocuments/whatever.doc "));
>
> Gives this html code in the Online project: <a 
> href=”*/export/sites/intranet/*myDocuments/whatever.doc” ... /> (This 
> works ok)
>
> And this in the Offline project: <a href=”/myDocuments/whatever.doc” 
> ... /> (this doesn’t work!)
>
> Am I right if I say that both links should be equal in offline and in 
> online project ? And if so, please, any tips around this behaviour or 
> how to fix it would be really appreciated.
>
> Thanks,
>
> Xabi
>
> (My opencms-importexport.xml file says:)
>
> ...
>
> <staticexport enabled="true">
>
> <staticexporthandler>org.opencms.staticexport.CmsOnDemandStaticExportHandler</staticexporthandler>
>
> <linksubstitutionhandler>org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler</linksubstitutionhandler> 
>
>
> <exportpath>export</exportpath>
>
> <exportworkpath>temp</exportworkpath>
>
> <exportbackups>2</exportbackups>
>
> <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}/export</rfs-prefix>
>
> <vfs-prefix>${CONTEXT_NAME}</vfs-prefix>
>
> <userelativelinks>false</userelativelinks>
>
> <exporturl>http://127.0.0.1:8180${CONTEXT_NAME}/handle404</exporturl 
> <http://127.0.0.1:8180$%7bCONTEXT_NAME%7d/handle404%3c/exporturl>>
>
> <plainoptimization>true</plainoptimization>
>
> <testresource uri="/system/shared/page.dtd"/>
>
> <resourcestorender>
>
> <regex>/sites/.*</regex>
>
> <regex>/system/workplace/commons/style/.*</regex>
>
> <regex>/system/galleries/.*</regex>
>
> <regex>/system/modules/.*/resources/.*</regex>
>
> </resourcestorender>
>
> </rendersettings>
>
> </staticexport>
>
> ...
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> 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