DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:bureaucracy

This is an old revision of the document!


Struct Plugin: Bureaucracy Support

The struct plugin supports integration with the Bureaucracy Plugin. This allows reusing the input mechanisms of the different types in bureaucracy forms and creation of structured data when pages are created through Bureaucracy's template action.

Single Field

You can use any field from any defined schema as a a field in a bureaucracy form. To do so simply use the type struct_field and specify the field name in the form of <schema>.<name>.

<form>
Action template templates:product product :
struct_field "products.product" @
submit "Create new product"
</form>

The defined (translated) label will automatically be used for the field as well as all the validation rules configured in the schema.

You can use the the value entered in a struct field as any other value for templating. Eg. you can use @@products.product@@ to access the value of the example above.

All struct values will be assigned to the resulting pages of (when using the bureaucracy template action), provided the schema assignments match.

plugin/struct/bureaucracy.1459343878.txt.gz · Last modified: 2016-03-30 15:17 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