[opencms-dev] Re: change resource type for "Create new index file in new folder"
Thomas März
thomas.maerz at gmail.com
Sat Nov 5 11:54:03 CET 2005
"G.R." <georg.nc at gmail.com> writes:
> when creating a new folder the user is prompt, to also create a new
> index ("Create new index file in new folder"). It then creates a page
> based on resource type "Page". Instead I want to use one specific
> structured content.
>
> Does anybody know how to realize / configure that.
> Thank's in advance for your help.
You can create your own folder type:
,----[ opencms-modules.xml ]
| <type class="org.opencms.file.types.CmsResourceTypeFolderExtended" name="MyFolder" id="501">
| <properties>
| <property>
| <name>MyProperty</name>
| <value><![CDATA[Folder]]></value>
| </property>
| </properties>
| <copy-resources>
| <copy-resource source="/system/modules/my.module/copy/index.html" target="${resource.folder.path}" type="new"/>
| <copy-resource source="/system/modules/my.module/copy/index.xml" target="${resource.folder.path}" type="new"/>
| </copy-resources>
| </type>
`----
When you create a new folder of this type two resources are copied to
this folder. Don't forget to add an explorertype node in the xml file.
HTH,
Thomas
More information about the opencms-dev
mailing list