DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:aggregation:list

Struct PluginAggregations

Struct Plugin: List Aggregation

As an alternative to the table, you can also aggregate the data in list form.

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
----

This aggregation is probably best suited for custom styled output using the classes option. All selected fields will be wrapped in their own HTML element and have an appropriate class name. When using the sepbyheaders option custom defined headers or the field labels will also be added.

Nesting

By default a flat list will be displayed. Basically one result row will result in one list item. The nest option allows to create a nested list. The number specified in the nest option declares how many of the selected fields will be nested.

This basically allows you to create a result list grouped by the number of fields specified.

Example. A normal search result might return:

  • audi a80 andi
  • audi quattro karsten
  • bmw i3 detlef
  • bmw i3 jörg

Using a nesting level of 1 would use the first column as grouping:

  • audi
    • a80 andi
    • quattro karsten
  • bmw
    • i3 detlef
    • i3 jörg

A nesting level of 2 would use the first two columns:

  • audi
    • a80
      • andi
    • quattro
      • karsten
  • bmw
    • i3
      • detlef
      • jörg

Alphabetical Index

The index option creates an alphabetical grouping of the result. The number specified in this option declares how many letters of the first selected fields will be used to created alpha index.

This option can be combined with the nesting option above.

plugin/struct/aggregation/list.txt · Last modified: 2023-07-19 17:16 by andi

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