1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-24 02:27:19 +00:00
TiddlyWiki5/plugins/tiddlywiki/text-slicer/macros.tid
Jermolene 9ec38eef32 Improve text-slicer macros
Encapsulate tiddler display so that we can detect draft tiddlers and
display them through their own template
2015-08-01 18:10:00 +01:00

28 lines
617 B
Plaintext

title: $:/plugins/tiddlywiki/text-slicer/macros
tags: $:/tags/Macro
\define display-tiddler()
<$list filter="[draft.of<currentTiddler>limit[1]]" editTemplate="$:/core/ui/EditTemplate" emptyMessage="""<$transclude mode='block'/>"""/>
\end
\define display-heading-tiddler(level:"h1")
<$level$><$view field="title"/></$level$>
<$list filter='[tag<currentTiddler>!has[draft.of]]'>
<$tiddler>
<<display-tiddler>>
</$tiddler>
</$list>
\end
\define display-list-tiddler(type:"ol")
<$type$>
<$list filter='[tag<currentTiddler>!has[draft.of]]'>
<li>
<$tiddler>
<<display-tiddler>>
</$tiddler>
</li>
</$list>
</$type$>
\end