DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:structtemplating

Struct Templating Plugin

Compatible with DokuWiki

No compatibility info given!

plugin Use Twig templates for custom struct data rendering

Last updated on
2021-05-21
Provides
Action
Repository
Source
Requires
struct

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

FAQ

Discussion

plugin/structtemplating.txt · Last modified: 2023-07-20 04:33 by iainhallam

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