Table of Contents

structstatus Plugin

Compatible with DokuWiki

Greebo

plugin Display a document status using struct data

Last updated on
2023-06-21
Provides
Syntax, Action
Repository
Source
Requires
struct

Similar to labeled, tagbutton

Tagged with status

This plugin adds a new type to the struct plugin to add a status to a page. The status can be shown and changed prominently in a sidebar.

The list of possible statuses is configured through a lookup schema.

Installation

:!: This plugin requires the struct plugin which has to be installed first.

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Setup

After installation, create a new schema status in the Schema Editor and import the schema provided in status.struct.json.

Next create a page and add the Global Data Editor for the schema:

---- struct lookup ----
schema: status
----

Use the editor to define the statuses you want to have available:

Now you can use the new Status type in your page schemas (the schema config references the lookup schema you created earlier)

To add the status widget to your sidebar, insert the following code into our sidebar:

~~NOCACHE~~
{{struct-status>pageschema.status}}

pageschema is the page schema you used the status type in and status is the name of that status field. The widget will only be shown when you are on a page that has the pageschema assigned.

The status can easily be changed by clicking the appropriate status (requires the proper permissions to edit the page and struct data).

Adding your own Icons

Icons are simply the base name of an SVG in the svg directory. If you want to use additional Icons, simply place the SVG in that directory and adjust the configuration of the icon DropDown field in your structstatus lookup schema to include the new icon's name. See https://materialdesignicons.com/ for a huge list of free matching icons.