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 [2020-06-22 18:50] – small update for clarity tech@tormantil.com | plugin:struct:aggregation [2024-03-13 18:17] (current) – [Special Columns] 91.89.222.218 | ||
---|---|---|---|
Line 1: | Line 1: | ||
<= [[plugin: | <= [[plugin: | ||
====== Struct Plugin: Aggregation ====== | ====== Struct Plugin: Aggregation ====== | ||
- | ===== Table ===== | ||
- | 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 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 14: | 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 | These are the schemas from which you want to display the data. Multiple schemas are not supported in all aggregations and controls. | ||
+ | | 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, | ||
+ | |||
+ | Where multiple schemas can be given, resulting rows will be **joined on their page ID**. The aggregation will list pages which have **all the given schemas** assigned. This of course means that you can never include a global data schema when using multiple schemas, because global data has no page id. Joining serial data may return unexpected results. | ||
+ | |||
+ | ==== All Fields ==== | ||
+ | |||
+ | You can select all fields available in the given schemas by using an asterisk '' | ||
+ | |||
+ | < | ||
+ | ---- struct table ---- | ||
+ | schema: schema1, schema2 | ||
+ | cols: %pageid%, * | ||
+ | ---- | ||
+ | </ | ||
- | ^ 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 schemas as long as they reference the same pages. This is of course not possible with aggregations of global data. | ||
==== Aliases ==== | ==== Aliases ==== | ||
Line 69: | Line 110: | ||
| '' | | '' | ||
- | ===== List ===== | + | In order to use them in templates, add another percent sign infront of the special name. E.g. for '' |
- | 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 | | ||
- | | cols\\ select | ||
- | | head\\ header\\ headers | ||
- | | max\\ limit | yes | | ||
- | | sort\\ order | yes | | ||
- | | filter\\ where\\ filterand\\ and | yes | | ||
- | | filteror\\ or | yes | | ||
- | | dynfilters | ||
- | | summarize | ||
- | | align | no | | ||
- | | rownumbers | ||
- | | width\\ widths | ||
- | | csv | no | |
plugin/struct/aggregation.1592844618.txt.gz · Last modified: 2020-06-22 18:50 by tech@tormantil.com