mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-06-06 00:29:12 +02:00
OcttKB Cross-Repo Sync (HTML to Raw)
This commit is contained in:
37
Wiki-OcttKB/tiddlers/System/$__Macros_TiddlerTree.tid
Normal file
37
Wiki-OcttKB/tiddlers/System/$__Macros_TiddlerTree.tid
Normal file
@ -0,0 +1,37 @@
|
||||
created: 20230301190809321
|
||||
creator: Octt
|
||||
modified: 20230301211845785
|
||||
modifier: Octt
|
||||
tags: $:/tags/Macro
|
||||
title: $:/Macros/TiddlerTree
|
||||
|
||||
<!-- Most of the code derived from:
|
||||
- $:/core/macros/toc
|
||||
-->
|
||||
|
||||
\define tiddlertree(tag,sort:"",itemClassFilter,exclude,path)
|
||||
\whitespace trim
|
||||
<div class="tc-table-of-contents">
|
||||
<$let tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}>
|
||||
<$set name="excluded" filter="[enlist<__exclude__>] [<__tag__>]">
|
||||
<$set name="FolderPath" value=<<StrAppend "$tag$" "/">> >
|
||||
<ol class="tc-toc toc-selective-expandable">
|
||||
<<tree_ "$tag$/" show-title:"false">>
|
||||
<$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]""">
|
||||
<$list filter="[all[current]toc-link[no]]" variable="ignore" emptyMessage=<<toc-selective-expandable-empty-message>> >
|
||||
<$macrocall $name="toc-unlinked-selective-expandable-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<excluded>> path=<<path>>/>
|
||||
</$list>
|
||||
</$list>
|
||||
<!--
|
||||
<$list filter="""[all[shadows+tiddlers]prefix<FolderPath>] -[<__tag__>] -[enlist<__exclude__>]""">
|
||||
<$list filter="[all[current]toc-link[no]]" variable="ignore" emptyMessage=<<toc-selective-expandable-empty-message>> >
|
||||
<$macrocall $name="tiddlertree-unlinked-selective-expandable-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<excluded>> path=<<path>>/>
|
||||
</$list>
|
||||
</$list>
|
||||
-->
|
||||
</ol>
|
||||
</$set>
|
||||
</$set>
|
||||
</$let>
|
||||
</div>
|
||||
\end
|
Reference in New Issue
Block a user