Search the documentation
 Show GitHub edit links  Hide GitHub edit links
In OpenCms since: 8.0 Documented since: 9.5 Latest revision for: 9.5 Valid for OpenCms: 10.5.3

For each resource type, its appearance in the ADE views, in particular in the page editor, can be configured in the module and the sitemap configuration. In the module configuration, you can choose a kind of default setting that can be overridden for your sitemap via the sitemap configuration.

We describe the different options available for resource types.

What is the resource type configuration for?

Depending on your website or subsite of your website, different resource types (also called content types) may be of interest. For example, you may have a subsite for job offers and a special content type for job offers. To allow adding job offer content only in the subsite, you can configure that such content is only displayed in the add wizard of the page editor when you are in the subsite.

Besides the visibility of content types, it may also be of interest where you store content, e.g., if you want a list of all job offers you can choose to only collect offers from a special folder.

Moreover, you can select element views in which a resource type should be displayed. Thus you can control which users can add, edit or move elements of which resource type and which elements should be edited in which view.

A correct resource type configuration in your module lets you expose resource types exactly as you want. A suitable configuration of resource types for a sitemap eases editing content because you can restrict the available resource types to the really relevant types and, if still too confusing, group them in different views.

Resource type configuration

In module and sitemap configurations, you can configure ADE related options for each resource type. FigureĀ [resourcetype_configuration] shows the configuration options for one resource type.

Fig. [resourcetype_configuration]: Configuration options for one resource type as shown in the form-based editor
Resource type configuration options
Type name

Select the resource type you want to configure.

Disabled

Set "Disabled" to "False" to enable using the content type, i.e., allow adding new and existing content of that type. Set it to "True" to disable the content type (do not show it in the add wizard or show content). Set it to "Adding disabled" if you do not want to allow adding new content of a type, but allow editing existing content (that could, for example, be given via model pages).

Folder

Choose in which folder the content should be stored. Here you can either choose an absolute path, just a folder name or the option "With page". If you choose the folder name, the content will be placed in a subfolder of .content/  with the given name. If, in a sitemap configuration, you choose "Local contents", the sitemap's local .content/ folder will be used, otherwise a .content/ folder an above sitemap. By default, content is stored in a subfolder {resource type name}/ of the .content/ folder.

If you use the option "With page", the content is stored in the .elements/ subfolder of the folder the edited page is in.

Name pattern

The name pattern to be used if new content of the specified resource type is added to a page. A typical pattern has the format {prefix}_%(number).xml. Be sure to use the %(number) macro to guarantee distinct names for all contents in a folder. The default name pattern is {resource type name}_%(number).xml.

Detail pages disabled

The add wizard of the sitemap editor has a tab "Detail pages" where you can add detail pages for resource types. If you check "Disable detail pages", a page for the resource type will not appear.

Element view

Resource types can be grouped in element views. Elements of a type can only be added, edited or removed from a page if the specific view is chosen. Otherwise, for all elements of the type, neither edit points are shown, nor are the types visible in the add wizard. Element views can be used to separate tasks or to control access to resource types. Read more about them here. By default, the "Default" element view is chosen.

Show in default view

If checked, elements of the resource type are not only shown in the specified element view, but also in the default view.

Copy in templates

Configure the default "Copy this element" value for elements of that type. I.e., specify if they are copied or reused when a container page (template) is copied.

Special settings for the sitemap

In a sitemap configuration, in addition to the configuration of single resource types, some settings that influence the configuration of all resource types are available.

Sitemap-specific resource type configuration options
Disable all

Disables all resource types configured via module configurations or parent sitemaps. In consequence, only resource types explicitly configured in the sitemap will be available.

Local content elements

If checked, a local .content/ folder is created and, whenever as "Folder" in a resource type configuration only a name is chosen, the resources will be stored locally in a subfolder of the .content/ folder. If the option is not checked, the .content/ folder of a parent sitemap or the site will be used.

Prefer local detail pages

If you link to content that is stored locally in the sitemap and your sitemap has a detail page for content of that type configured, then this detail page will be preferred over a detail page that might be configured for the calling (sub-)site, i.e., the (sub-)site where the link to the content is placed. If the option is not checked, the detail page from the "calling (sub)site" will be preferred.

The feature only works for content that is stored locally in a folder under the (sub-)sitemaps main folder.

You can improve this page

Please contribute your suggestions or comments regarding this topic on our wiki. For support questions, please use the OpenCms mailing list or go for professional support.