Explorertype
(How to define your own explorer types to group resource types.) |
(Another syntax fix) |
||
(One intermediate revision by one user not shown) | |||
Line 10: | Line 10: | ||
<source lang="xml"> | <source lang="xml"> | ||
<explorertype name="xmlmygroup" key="fileicon.xmlmygroup" icon="mygroupicon.gif" reference="xmlcontent"> | <explorertype name="xmlmygroup" key="fileicon.xmlmygroup" icon="mygroupicon.gif" reference="xmlcontent"> | ||
− | <newresource uri="newresource.jsp?page=xmlmygroup" order="5" autosetnavigation="false" autosettitle="false" | + | <newresource uri="newresource.jsp?page=xmlmygroup" order="5" autosetnavigation="false" autosettitle="false" info="myxmlgroup"/> |
</explorertype> | </explorertype> | ||
</source> | </source> |
Latest revision as of 05:44, 11 September 2010
Contents |
Explorertypes
Explorer types are definded either in opencms-workplace.xml or in opencms-modules.xml. They define how the OpenCms workplace explorer handles resource types. You can configure in the explorertype section names to be displayed and an info (later definded in workplace.properties of your module) to give the user an idea what the resource type is for and an icon. In the newresource subsection you specify which particular jsp will handle the creation process of new resources of your type. In most cases this will be newresource.jsp which is the system default jsp to create xml content types.
Define a custom subsection in "new"-dialogue for your resourcetypes
Insert the following definition in the explorertypes-section of your module in opencms-modules.xml:
<explorertype name="xmlmygroup" key="fileicon.xmlmygroup" icon="mygroupicon.gif" reference="xmlcontent"> <newresource uri="newresource.jsp?page=xmlmygroup" order="5" autosetnavigation="false" autosettitle="false" info="myxmlgroup"/> </explorertype>
Assign your resource types to the subsection
Assign the resource types to be grouped in "xmlmygroup" to this section by setting the page attribute of your resource type:
<explorertype name="mycontent" key="fileicon.mycontent" icon="mycontenttypeicon.gif" reference="xmlcontent"> <newresource page="xmlmygroup" uri="newresource_xmlcontent.jsp?newresourcetype=mycontent" order="50" autosetnavigation="false" autosettitle="false"/> </explorertype>
Don't forget to define your resource type "mycontent" in the resource type section of your module in opencms-modules.xml. Now upload the icons (i.e. "mycontenttypeicon.gif" and "mygroupicon.gif") to the /system/workplace/resources/filetypes/ folder and don't forget to assign this resource(s) to your module. Make the appropriate definitions for your resource types in the workplace.properties file in the /classes folder of your module and restart Tomcat afterwards.
Related topics
- It is also possible to hide resource types in the "new"-dialogue by assigning user rights.
- General information on resources.