From f4437192236a2a5b92633d0932455234fb4a788a Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 17 Aug 2015 11:16:53 -0400 Subject: [PATCH] Text-slicer: Add selectable output views --- .../text-slicer/template-display-document.tid | 24 ++++++++++++++++++- .../text-slicer/template-toc-entry.tid | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 plugins/tiddlywiki/text-slicer/template-toc-entry.tid diff --git a/plugins/tiddlywiki/text-slicer/template-display-document.tid b/plugins/tiddlywiki/text-slicer/template-display-document.tid index 2190fb076..fd50b51ec 100644 --- a/plugins/tiddlywiki/text-slicer/template-display-document.tid +++ b/plugins/tiddlywiki/text-slicer/template-display-document.tid @@ -4,16 +4,38 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/display-document $:/plugins/tiddlywiki/text-slicer/config/show-toolbar/$(currentTiddler)$ \end +\define config-view-type() +$:/plugins/tiddlywiki/text-slicer/config/view-type/$(currentTiddler)$ +\end + +\define display-document() +<> +\end + \define display-tiddler() <$set name="tv-show-toolbar" value={{$(config-show-toolbar)$}}> +View: <$select tiddler=<> default="display-document"> + + + + + <$checkbox tiddler=<> field="text" checked="yes" unchecked="no" default="no"> Show toolbar
<$set name="tv-show-toolbar" value={{$(config-show-toolbar)$}}> -<$macrocall $name="toc-tabbed-internal-nav" tag=<>/> +<$list filter="[field:title[$(config-view-type)$]]" variable="listItem" emptyMessage=""" + +<$macrocall $name="display-document" tag=<> template="$:/plugins/tiddlywiki/text-slicer/templates/toc-entry"/> + +"""> + +<$macrocall $name={{$(config-view-type)$}} tag=<> template="$:/plugins/tiddlywiki/text-slicer/templates/toc-entry"/> + + diff --git a/plugins/tiddlywiki/text-slicer/template-toc-entry.tid b/plugins/tiddlywiki/text-slicer/template-toc-entry.tid new file mode 100644 index 000000000..0eaf1bd36 --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/template-toc-entry.tid @@ -0,0 +1,3 @@ +title: $:/plugins/tiddlywiki/text-slicer/templates/toc-entry + +<$transclude/>