Tab configuration
Configuration of tabs
Tabs are configured in the schema definition under xsd:annotations/xsd:appinfo
. Use the node <tabs>
to configure them. If used without sub-nodes, the tabs are configured automatically by OpenCms. To set up the tabs explicitly according to your needs, use a sub-node <tab>
for each of them:
<tabs>
<tab element="Title" collapse="false" name="General" />
<tab element="Author" collapse="false" name="AuthorTab" />
<tab element="Availability" collapse="true" name="Availability">
<description>In this tab you can configure release and expiration dates.</description>
</tab>
</tabs>
In the example, three tabs are defined. Each <tab>
element is configured via its attributes as follows:
Attributes of the <tab>
node
-
element
Name of the first
<xsd:element>
placed in the tab.-
collapse
If only one element (typically a nested content with sub-elements) should appear in one tab, the element's name can be hidden. Therefore, set
collapse="true"
. Otherwise, omit it, or set it tofalse
.-
name
Define the name shown in the tab. If the attribute is not given, the element's name is used as the tab name. To localize the tab name, use the key macro, e.g., place
%(key.{name of the key})
. The key must reside in a workplace bundle.
The last tab element has the optional sub-node <description>
. If provided, the text inside this node is displayed as extra information at the very top of the tab content. Use the %(key.)
macro for localized descriptions and provide a key from a workplace bundle.