From 9ec38eef3283ca21652b1f6124931e1cbf541077 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 1 Aug 2015 18:10:00 +0100 Subject: [PATCH] Improve text-slicer macros Encapsulate tiddler display so that we can detect draft tiddlers and display them through their own template --- plugins/tiddlywiki/text-slicer/macros.tid | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/tiddlywiki/text-slicer/macros.tid b/plugins/tiddlywiki/text-slicer/macros.tid index cd76b4a48..bcba9bc62 100644 --- a/plugins/tiddlywiki/text-slicer/macros.tid +++ b/plugins/tiddlywiki/text-slicer/macros.tid @@ -1,21 +1,25 @@ title: $:/plugins/tiddlywiki/text-slicer/macros tags: $:/tags/Macro +\define display-tiddler() +<$list filter="[draft.oflimit[1]]" editTemplate="$:/core/ui/EditTemplate" emptyMessage="""<$transclude mode='block'/>"""/> +\end + \define display-heading-tiddler(level:"h1") <$level$><$view field="title"/> -<$list filter='[tag]'> +<$list filter='[tag!has[draft.of]]'> <$tiddler> -<$transclude mode='block'/> +<> \end \define display-list-tiddler(type:"ol") <$type$> -<$list filter='[tag]'> +<$list filter='[tag!has[draft.of]]'>
  • <$tiddler> -<$transclude mode='block'/> +<>