mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-24 02:27:19 +00:00
9ec38eef32
Encapsulate tiddler display so that we can detect draft tiddlers and display them through their own template
28 lines
617 B
Plaintext
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
|