Create template opencms


















Adding a content type A 'Content type' is usually used as a synonym for resource type in OpenCms. We assume there is a module my.

The first three items are the most relevant ones: Type id is auto-generated by the system, you can change it, but it must be unique on the OpenCms installation. It's used internally to identify the 'Content type' is usually used as a synonym for resource type in OpenCms.

We recommend to use at least five digits and specify a range for your ids upfront. Name is the programatic name of the type. It must be unique. XPath element-name is the name of the content's main XML node. Since OpenCms 11 it is not ultimately necessary to make it unique, but it is preferrable to not break, e. You have to use field settings to not get into trouble with dublicate keys in the workplace message bundle when you have dublicated XPath element names.

Then you have two localizations: Display name is the localized in your If you are logged in to OpenCms, you are in the OpenCms workplace. Description is the localized in your If you are logged in to OpenCms, you are in the OpenCms workplace. If you want to see the type definition, look out for demo-content in the opencms-modules. You will find a node resourcetype and a node explorertype. We will concentrate on adjusting schema, In OpenCms contents are rendered by formatters.

If you want more information: See here for more details on what the "Add resource type" wizard does See the opencms-resourcetypes. Options not set by the "Add 'Resource type' is typically used as a synonym for content type. The content's schema The wizard we ran to add the new 'Content type' is usually used as a synonym for resource type in OpenCms. Here's the automatically generated schema, explanations follow. In the schema, you find the "XPath element-name" "DemoContent" that we specified for our 'Content type' is usually used as a synonym for resource type in OpenCms.

It's used in the "structural wrapper" that's similar for each 'Content type' is usually used as a synonym for resource type in OpenCms. These are the nodes you alter specifically for your type. We just stick to the elements defined by default. A valuable hint for the element nodes concerns the type attribute.

OpenCms has multiple built-in schema types for various purposes. The auto-generated schema has some of the possible subnodes. Here we localize the default value for the title. Here you specify the widget to use and many other things. Read more about the field settings here. Many more options are present, see the topic on defining a contents behavior for more information.

Click here to download. Update your existing OpenCms installation to the current stable version Click here to see the guided tour of OpenCms.

Do you want to take a quick test drive of OpenCms to get an impression of its great features? Deutsch Kontakt Print page Search. To the fast access Main navigation. If editing a template model, for each element you can decide if the element should be copied or reused if a page is created using the model. Therefor, click the gear wheel at the element to open the element settings.

In the group "Template model options" the option "Copy this element" can be checked if the element should be copied. If the option is unchecked, the element will be reused. When you add a new template model, the container page is created in the current sitemap's subfolder. In this configuration file. You can:. Welcome Tutorial Release notes Search Login. Toggle navigation. Creating template models Overview Documentation Creating a website Creating template models. Introduction About this documentation Why OpenCms?

We explain how to add new template models for your site and how to edit them. Related links General description of the sitemap editor Read on how to configure your sitemap in general. Template models are created in a sitemap and are available only in this sitemap and in the default configuration also in sub-sitemaps. So, if you create a template model, make sure to be in the correct sitemap.



0コメント

  • 1000 / 1000