From b30126ec22ef4b8493ca86f65cc96bdb5c56ab7f Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 27 Sep 2015 22:49:55 +0100 Subject: [PATCH] Text-slicer: add support for document metadata fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The metadata for each field is in a tiddler tagged `$:/tags/DocumentMetaData` with the field `caption` being the displayed caption for the field and `field` being the name of the field. `field-type` is the type of the field, and can be “string” or “list”. --- .../text-slicer/ui/document/header.tid | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/plugins/tiddlywiki/text-slicer/ui/document/header.tid b/plugins/tiddlywiki/text-slicer/ui/document/header.tid index 0ffeabe7b..3cd254183 100644 --- a/plugins/tiddlywiki/text-slicer/ui/document/header.tid +++ b/plugins/tiddlywiki/text-slicer/ui/document/header.tid @@ -1,5 +1,21 @@ title: $:/plugins/tiddlywiki/text-slicer/ui/document/header +\define metadatafield() + + +''<$transclude tiddler=<> field="caption"/>'' + + +<$reveal type="match" state="""$(listItem)$!!field-type""" text="string"> +<$edit-text field={{$(listItem)$!!field}}/> + +<$reveal type="match" state="""$(listItem)$!!field-type""" text="list"> +<$edit-text tag="textarea" field={{$(listItem)$!!field}}/> + + + +\end +
''Exclude filter'': <$edit-text field="toc-exclude-filter"/> @@ -11,4 +27,12 @@ title: $:/plugins/tiddlywiki/text-slicer/ui/document/header View document + + +<$list filter="[all[system+tiddlers]tag[$:/tags/DocumentMetaData]]" variable="listItem"> +<> + + +
+