plugin:struct:aggregation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:struct:aggregation [2016-12-08 10:41] – [Special Columns] grosse | plugin:struct:aggregation [2024-03-13 18:17] (current) – [Special Columns] 91.89.222.218 | ||
---|---|---|---|
Line 2: | Line 2: | ||
====== Struct Plugin: Aggregation ====== | ====== Struct Plugin: Aggregation ====== | ||
- | Aggregation of structured data is the main purpose of the plugin. Aggregation is done through a simple syntax which will result in a dynamic table listing all pages and associated data matching certain criteria. | ||
- | The basic syntax | + | Aggregation of structured data is the main purpose of the plugin. Aggregation is done through simple syntax mechanisms that are used to collect, filter, sort and output data stored in schemas. Currently, there are three types of **aggregations**: |
+ | |||
+ | |||
+ | * [[plugin: | ||
+ | * [[plugin: | ||
+ | * [[plugin: | ||
+ | |||
+ | The editors for global and serial data are aggregations, | ||
+ | |||
+ | * [[plugin: | ||
+ | * [[plugin: | ||
+ | |||
+ | |||
+ | In addition to the above output types, there exist some syntax to add additional **controls** to the displayed aggregation data: | ||
+ | |||
+ | * [[plugin: | ||
+ | * [[plugin: | ||
+ | |||
+ | |||
+ | ===== Aggregation Options ===== | ||
+ | |||
+ | All the above syntax modes (except [[plugin: | ||
<code wiki> | <code wiki> | ||
Line 13: | Line 33: | ||
</ | </ | ||
- | The aggregation-syntax is very similar to that of the [[plugin: | ||
- | The keyword before the colon is a configuration option and the value after it is the actual setting. To make it more fault tolerant, multiple option names are frequently possible. | + | The keyword before the colon is a configuration option and the value after it is the actual setting. To make it more fault tolerant, multiple option names are frequently possible. |
- | ^ Option(s) | ||
- | | schema\\ from | yes | These are the schemas from which you want to display the data. | | ||
- | | cols\\ select | ||
- | | head\\ header\\ headers | ||
- | | max\\ limit | no | How many rows should be displayed. If more rows are available the table will be made browsable. If not given all matching rows are shown | | ||
- | | sort\\ order | no | By what column should the table be sorted initially? Prepend a '' | ||
- | | filter\\ where\\ filterand\\ and | no | Filter by a column value. You may specify this more than once, multiple filters will be ANDed. (see also [[plugin: | ||
- | | filteror\\ or | no | Like filter, but multiple instances will be ORed (see also [[plugin: | ||
- | | dynfilters | ||
- | | summarize | ||
- | | align | no | List of column alignments. The alignments can be '' | ||
- | | rownumbers | ||
- | | width\\ widths | ||
- | | csv | no | Set to '' | ||
- | Please note that you can join data from multiple page schemas | + | ^ Option(s) |
- | ===== Aliases | + | | schema\\ from | These are the schemas from which you want to display the data. Multiple |
+ | | cols\\ select | ||
+ | | align | List of column alignments in table output. The alignments can be '' | ||
+ | | class\\ classes | ||
+ | | csv | Set to '' | ||
+ | | dynfilters | ||
+ | | filter\\ where\\ filterand\\ and | Filter by a column value. You may specify this more than once, multiple filters will be ANDed. (see also [[plugin: | ||
+ | | filteror\\ or | Like filter, but multiple instances will be ORed (see also [[plugin: | ||
+ | | head\\ header\\ headers | ||
+ | | index | Number of letters to use to create an alphabetical index for lists | list | | ||
+ | | max\\ limit | How many results should be displayed. Tables will be paginated, other aggregations and controls will ignore additional reaults | ||
+ | | nesting\\ nest | Number of levels to nest list results | ||
+ | | rownumbers | ||
+ | | sepbyheaders | ||
+ | | sort\\ order | By what column should the table be sorted initially? Prepend a '' | ||
+ | | summarize | ||
+ | | target\\ page | The page to which filter links should point to. If not specified, the current page is used. | filter\\ cloud | | ||
+ | | width\\ widths | ||
+ | |||
+ | ===== Schema and Column Selection ===== | ||
+ | |||
+ | As mentioned above, all aggregations | ||
+ | |||
+ | Where multiple schemas can be given, resulting rows will be **joined | ||
+ | |||
+ | ==== All Fields | ||
+ | |||
+ | You can select all fields available in the given schemas by using an asterisk '' | ||
+ | |||
+ | < | ||
+ | ---- struct table ---- | ||
+ | schema: schema1, schema2 | ||
+ | cols: %pageid%, * | ||
+ | ---- | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Aliases | ||
When selecting data from multiple schemas which contain the same field names, you have to prefix them with the schema name: | When selecting data from multiple schemas which contain the same field names, you have to prefix them with the schema name: | ||
Line 44: | Line 86: | ||
</ | </ | ||
- | You can use aliases to reference schemas to type less. Aliases are separated by a space from the schema name: | + | You can use aliases |
< | < | ||
Line 56: | Line 98: | ||
- | ===== Special Columns | + | ==== Special Columns ==== |
The following special column names can be used to access non-field columns: | The following special column names can be used to access non-field columns: | ||
- | ^ Special Name ^ Description | + | ^ Special Name |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
+ | | '' | ||
+ | | '' | ||
+ | In order to use them in templates, add another percent sign infront of the special name. E.g. for '' | ||
- | ===== List ===== | ||
- | As an alternative to the table, you can also aggregate the data in list form. This is largely analogous to [[plugin: | ||
- | The basic syntax for list aggregations is very similar to table aggregations and looks like this: | ||
- | < | ||
- | ---- struct list ---- | ||
- | schema: schema_name | ||
- | cols: %pageid%, other, cols | ||
- | ---- | ||
- | </ | ||
- | Lists support a new option: '' | ||
- | Several options from the table-aggregation are not supported for the list-aggregation: | ||
- | ^ Option | ||
- | | schema\\ from | yes | These are the schemas from which you want to display the data. | | ||
- | | cols\\ select | ||
- | | head\\ header\\ headers | ||
- | | max\\ limit | no | How many rows should be displayed. If more rows are available the table will be made browsable. If not given all matching rows are shown | | ||
- | | sort\\ order | no | By what column should the table be sorted initially? Prepend a '' | ||
- | | filter\\ where\\ filterand\\ and | no | Filter by a column value. You may specify this more than once, multiple filters will be ANDed. (see also [[plugin: | ||
- | | filteror\\ or | no | Like filter, but multiple instances will be ORed (see also [[plugin: | ||
- | | dynfilters | ||
- | | summarize | ||
- | | align | no | List of column alignments. The alignments can be '' | ||
- | | rownumbers | ||
- | | width\\ widths | ||
- | | csv | no | Set to '' |
plugin/struct/aggregation.1481190111.txt.gz · Last modified: 2016-12-08 10:41 by grosse