[opencms-dev] CMSAfterPublishStaticExportHandler

Chad Thompson chadt at utah.gov
Mon Dec 4 16:29:52 CET 2006


I am attempting to setup a CMSAfterPublishStaticExportHandler config file.  Everything is working fine except the workplace.  It appears that the workplace is using relative links, even though I only set that up on the default site.  The administration pages do not apply the CSS file becaues the path is ../../../path/to/css which ends up being /opencms/system/system/path/to/css (notice the two system directories).  Any ideas?  

I have setup the site using the following config file:

	<staticexport enabled="true">
		<staticexporthandler>org.opencms.staticexport.CmsAfterPublishStaticExportHandler</staticexporthandler>
		<exportpath>export</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}/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/galleries/.*</regex>
				<regex>/system/modules/.*/resources/.*</regex>
                <export-rules>
                    <export-rule>
                        <name>Default rule</name>
                        <description>default rule</description>
                        <modified-resources>
                            <regex>/sites/default/.*</regex>
                        </modified-resources>
                        <export-resources>
                            <uri>/sites/default/</uri>
                        </export-resources>
                    </export-rule>
                </export-rules>
            </resourcestorender>
            <rfs-rules>
                <rfs-rule>
                    <name>default</name>
                    <description>rfs-rule for the default site</description>
                    <source>/sites/default/.*</source>
                    <rfs-prefix></rfs-prefix>
                    <exportpath>C:/Inetpub/www</exportpath>
                    <userelativelinks>true</userelativelinks>
                    <related-system-res>
                    </related-system-res>
                </rfs-rule>
            </rfs-rules>
        </rendersettings>
	</staticexport>

I also am seeing some links in my templated resources that point to /sites/default/path/to/file.  Is there any way to get rid of the /sites/default in that link?







More information about the opencms-dev mailing list