mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-02 16:16:18 +00:00
de5b0062b5
* add a new-line before the log text to increase readability of the test output * make eslint, jslint happy * extend fields-widget with include/exclude/sort/reverse and fields-filter with include and exclude params plus DOCS * remove new-line * remove eslint settings * restore old eslint settings * remove typo
34 lines
1.4 KiB
Plaintext
34 lines
1.4 KiB
Plaintext
title: FieldsWidget
|
|
created: 201310241419
|
|
modified: 20150220161240000
|
|
tags: Widgets
|
|
caption: fields
|
|
|
|
! Introduction
|
|
|
|
The fields widget renders each field of a specified tiddler through a simple text template. A list of fields to exclude can be provided. It is used internally by TiddlyWiki5, notably by the FileSavingMechanism.
|
|
|
|
!! Template Handling
|
|
|
|
The provided template is rendered with the following special substitutions:
|
|
|
|
|!Symbol |!Substitution |
|
|
|$name$ |Field name |
|
|
|$value$ |Field value |
|
|
|$encoded_value$ |HTML encoded form of field value |
|
|
|
|
! Content and Attributes
|
|
|
|
The content of the `<$fields>` widget is ignored.
|
|
|
|
|!Attribute |!Description |
|
|
|tiddler |Title of the tiddler from which the fields are to be displayed (defaults to the [[current tiddler|Current Tiddler]]) |
|
|
|template |Text of the template (see above) |
|
|
|exclude |Lists of fields to be excluded (defaults to "text") |
|
|
|include |Lists of fields to be included, if the field exists. This parameter takes precedence over "exclude" |
|
|
|sort |Sorts the fields by name (defaults to "yes"). Set to "no", if "include" order should be retained! |
|
|
|sortReverse |Reverses the sort order|
|
|
|stripTitlePrefix |If set to "yes" then curly bracketed prefixes are removed from titles (for example `{prefix}HelloThere` converts to `HelloThere`) |
|
|
|
|
The `stripTitlePrefix` attribute is used when building TiddlyWiki Classic; see `editions/tw2` in the TiddlyWiki5 repo.
|