[opencms-dev] Unable to export file using static export

Schliemann, Kai K.Schliemann at comundus.com
Thu Aug 28 09:13:34 CEST 2014


Hi Sharad,
you have to set the defaultpropertyvalue to "true". Otherwise only the files with the defaultsuffixes get exported. Enabling static export doesn't mean, that all resources get exported. That is a bit misleading.

If you want to decide folderwise, which resources should be exported, you can leave your config file as you have it and instead set the property "export" to true on a folder in your VFS. This is inherited on subfolders.
So if you set it on the folder "sites/default", all resources below this folder will get statically exported.
HTH

Best regards
Kai


-----Ursprüngliche Nachricht-----
Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Sharad Jain
Gesendet: Donnerstag, 28. August 2014 07:49
An: opencms-dev at opencms.org
Betreff: [opencms-dev] Unable to export file using static export

Hi,



I am unable to export my files from openCms using the static export.

I have some HTMl pages under /sites/default which uses the templates present in /system/modules/Mymodule/templates.My opencms-importexport config file looks as below :



<staticexport enabled="true">

	
	<staticexporthandler>org.opencms.staticexport.CmsAfterPublishStaticE
xportHandler</staticexporthandler>

	
	<linksubstitutionhandler>org.opencms.staticexport.CmsDefaultLinkSubs
titutionHandler</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}${SERVLET_NAME}</vfs-
prefix>

			<userelativelinks>false</userelativelinks>

			<exporturl>http://127.0.0.1:8080
${CONTEXT_NAME}/handle404</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>

<export-rules>

<export-rule>

        <name>ExportTest</name>

        <description>This rule will export all resources under /sites/default/,

                     if any resource
under /system/modules/mymodule/templates/ is modified</description>

        <modified-resources>

            <regex>/system/modules/mymodule/templates/.*</regex>

        </modified-resources>

        <export-resources>

            <uri>/sites/default/</uri>

        </export-resources>

    </export-rule>

</export-rules>



			</resourcestorender>

		</rendersettings>

	</staticexport>

	



can anyone please help me with this?



Thanks,



Sharad Jain

_______________________________________________
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/cgi-bin/mailman/listinfo/opencms-dev






More information about the opencms-dev mailing list