OpenWGA 7.9 - OpenWGA Concepts and Features

Design and development » Design configuration

Tab "Design Schema"

A design schema predefines schema documents that an OpenWGA content store needs when it is connected to an OpenWGA application using the current design. The documents defined here are automatically created when the OpenWGA application is connected (unless this is explicitly prevented). That way the content store can directly gain the necessary content types, languages and website areas that are needed for the application to work.

This is one alternative to initialize a content store which should be the most comfortable in many situations. Other alternatives that may be more suitable in special situations are specifying an initial dataset or creating needed resources in an initialisation script (see Tab "Design Configuration").

Design schemas are only available if a design is developed for OpenWGA 5.2 or later versions.

screenshot_52.png


Adding schema definitions

To add a schema definition to the schema just click the "new" button on the schema definition section. There you can create all three types of schema documents: Content types, languages and website areas.

An editor for the chosen schema document definition will appear where you can specify a name that will be used for it. Via checkbox auto creation you can control if OpenWGA should automatically create the schema document in connected content stores if it does not already exist, which is the most common and useful case.

For special situations you can keep the schema definition from being used to create a corresponding document in content store by clearing the "auto creation" checkbox, but then there is no guarantee that this document is available in the content store (unless it is created somewhere else). In that case the schema definition can still be used to predefine metadata values and items on these content types, if they are available.

Adding metadata definitions

On content type definitions you have to ability to predefine metadata field values for some selected metadata fields. These are:

  • Allowed positions: Valid positions for pages of this content type (meta field POSITIONING and ALLOWEDPOSITIONS)
  • Allowed child pages: Settings for valid child pages of pages of this content type (meta CHILDPAGERESTRICTIONS and ALLOWEDCHILDTYPES)
  • Description: Some description of the purpose of this content type (meta DESCRIPTION)
  • Editors: A list of users, groups and roles allowed to create and edit pages for this content type (meta EDITORS)
  • Eventscript (save content): TMLScript code for the event on saving content of this content type (meta EVENTSAVECONTENT)
  • Eventscript (create content): TMLScript code for the event on creating content of this content type (meta EVENTCREATECONTENT)
  • Eventscript (send workflow mail): TMLScript code for the event on sending workflow mails for contents of this content type (meta EVENTWORKFLOWMAIL)
  • Inner layout: Name of the WebTML module(s) used as inner layout on contents of this content type (meta INNERLAYOUT)
  • Outer layoutName of the WebTML module(s) used as outer layout on contents of this content type  (meta OUTERLAYOUT)

If a metadata value is predefined for a content type in schema definition then OpenWGA will always use this value directly from the definition, even if the content type document in database was not created on behalf of the schema. So these metadata definitions effectively override anything that may be stored on the content type document.

To predefine metadata values:

  • Click link "add metadata..." while a content type definition or some subnode is selected on the schema definition section
  • Check the checkboxes of metadata fields that you want predefined and click button "ok"
  • Subnodes are created for each metadata field below the content type definition. Select each of them for an editor where you can predefine the value of the individual metadata field

Adding item definitions

For content type definitions you have the ability to predefine items for their content documents. This has two different purposes:

  • Some OpenWGA functionalities need item definitions to expose these items data, for example the OpenWGA CMIS Server
  • You can specify initial values for predefined items. When a new content document of this content type is created OpenWGA will automatically create these items with their predefined values.

To add an item definition:

  • Click link "add item defintiion..." while a content type definition or some subnode is selected on the schema definition section
  • A new item definition node is created below the content type definition and an item definition editor is displayed:
    • Enter the "Itemname"
    • Under "Type" select an item data type
    • Check the checkbox "List" if this is an item with multiple values
    • Optionally add "Initial values" to the list below if you want the item to be automatically created for new content documents
      • Click button "add" for a new value entry
      • Enter the value in the newly created list row

Note that item definitions for content types work fundamentally different from metadata definitions in the following points:

  • Metadata definitions define metadata fields for the content type document itself. Item definitions define items for content documents that are of the defined content type.
  • The predefined values of metadata definitions are always in effect, even if the content type document was not created on behalf of the schema.  The initial values of item definitions are only used for newly created content documents. Existing content documents are not affected.