Table of Contents
Struct Templating Plugin
Compatible with DokuWiki
No compatibility info given!
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to structtemplate
Installation
External requirements: This plugin requires the following additional components that must be installed separately:
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
Add Twig templates in lib/plugin/structtemplating/assets/templates/schema/<schema>.twig
which will then be used to render the struct schema data attached to the page before the body is rendered.
You can access properties of the schema through the schema variable and by calling functions available in the Schema class.
The field data is available through the data array. Each element also has a rendered property that contains the result of the DokuWiki's renderer.
The raw values can be accessed via getValue or other methods in the Value class.
See default.twig.example for some examples.
Stylesheets
By default the plugin installs a style.less stylesheet that imports assets/style/style.less. This allows you to add your custom stylesheets in the assets/style/ directory and track them together with your templates.
Tracking Changes in Templates and Stylesheets
The assets directory is empty when the plugin is installed. You can use it as the root for a git repository to put your templates and stylesheets under version control.
Change Log
- Use include_once instead of include to reference script.js (2021-05-02 17:45)
- Add TwigColorExtension for color adjustment within Twig (2021-05-02 17:45)
- Add missing variable for renderer format for aggregation tables (2021-05-02 17:45)
- Add common template directory and catch FilesystemLoader exceptions (2021-05-02 17:41)
- Handle aggregation table templates (2021-03-28 23:49)
- Include javascript file from assets directory (2021-03-28 23:34)
- Include all three types of stylesheets (screen, print, generic) (2021-03-26 16:24)
- Account for changes in the struct plugin and add missing format variable (2021-02-26 09:51)