DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:type

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:struct:type [2023-04-03 20:06] – [Table] anndaplugin:struct:type [2023-11-01 16:11] (current) – [Struct Plugin: Field Types] andi
Line 1: Line 1:
 <= [[plugin:struct|Struct Plugin]] <= [[plugin:struct|Struct Plugin]]
-====== Struct Plugin: Types ======+====== Struct Plugin: Field Types ======
  
-Types are used when defining schemas. Each field in the schema has to have a type. It configures what data is accepted in the field and how it will be displayed later on.+When defining fields in schemas, their types have to be specified. Each field in the schema has to have a type. It configures what data is accepted in the field and how it will be displayed later on
 + 
 +Note: in general you're free to give your fields arbitrary names. However for ease of use, it is recommended to use simple identifiers as name and use the field label for nicer names. Especially the use of spaces or dots can make the use of the field in aggregation and filter syntax more complicated than needed. Eg. instead of using ''No. of projects'' as the field name, just use ''projects'' as the name and fill the label with ''No. of projects''.
  
 ===== Available Types ===== ===== Available Types =====
Line 30: Line 32:
 | label                   | array of strings  | This array contains keys for all languages available in the wiki (as defined by the [[plugin:translation]] plugin). You can use this to set translated labels for the field. These are used when showing the data or displaying the data editor. It's recommended to use short, rarely changing field names and set speaking names through this mechanism.  | | label                   | array of strings  | This array contains keys for all languages available in the wiki (as defined by the [[plugin:translation]] plugin). You can use this to set translated labels for the field. These are used when showing the data or displaying the data editor. It's recommended to use short, rarely changing field names and set speaking names through this mechanism.  |
 | hint                    | array of strings  | Similar to the label field but can be used to give some more detailed info about how to fill the field in question. Shown as tooltip.                                                                                                                                                                                                                       | | hint                    | array of strings  | Similar to the label field but can be used to give some more detailed info about how to fill the field in question. Shown as tooltip.                                                                                                                                                                                                                       |
-| visibility -> inpage    | boolean           | When disabled, empty fields will not be displayed in the struct banner of the page.                                                                                                                                                                                                                                                                         |+| visibility -> inpage    | boolean           | When disabled, fields will not be displayed in the struct banner of the page.                                                                                                                                                                                                                                                                         |
 | visibility -> ineditor  | boolean           | When disabled, the field will not be displayed when editing the page. Data can be entered only through a bureaucracy form or in aggregations.                                                                                                                                                                                                               | | visibility -> ineditor  | boolean           | When disabled, the field will not be displayed when editing the page. Data can be entered only through a bureaucracy form or in aggregations.                                                                                                                                                                                                               |
  
  
plugin/struct/type.1680545167.txt.gz · Last modified: 2023-04-03 20:06 by annda

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