DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:schemaedit

This is an old revision of the document!


Struct Plugin

Struct Plugin: Schema Editing

Schemas are used to manage the structured data that can be assigned to pages. You can think of them as a table definition. A schema defines which fields will be available and what type they have.

Schemas are agnostic of how the data is going to be used. In previous versions of the plugin you had to decide up-front if your schema would be assigned to pages (page schema) or contain free-floating data to be used anywhere (lookup schema). This is no longer the case.

To create a new schema, log in as a Manager and access the “Admin” page. Select the “Struct Schema Editor” from the “Additional Plugins” section. Use the form to create a new schema.

Existing schemas can be selected in the table of contents and can be edited there.

Important: Fields can not be deleted, only be disabled!

Schema usage

Schemas can be deployed to manage data in the three following ways:

  • Page data is directly associated with exactly the one page it was entered for. To be able to enter page data, the schema has to be assigned to the page via Assignments. You can think of page data as additional metadata for a page. This is what you may know from the old data plugin. Page data is revisioned with the page it is associated to.
  • Global data (previously called lookup schemas) is not assigned to pages. It is a collection of data sets (rows) held globally. This is useful for data that you want to use as a Lookup source or for data that doesn't justify a page per entry. You edit them by adding a Global Data Editor to a page. You can reference their values in any aggregation. Global data has no revisions or history.
  • Serial data is bound to a Wiki page. In this respect they are somewhat similar to page data. However, serial data does not belong to a specific page revision and you can have many serial datasets per page. Serial data has no revisions or history.

Note: in older versions of the plugin, the future use of the schema had to be defined when creating it. This is no longer the case. A schema can be used for all three of the above use cases simultaneously, though this will probably rarely be the case in the real world.

plugin/struct/schemaedit.1589744586.txt.gz · Last modified: 2020-05-17 21:43 by Digitalin

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki