DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:structstatus

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

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.

plugin/structstatus.txt · Last modified: 2023-06-22 08:21 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