Skip to content

Commit

Permalink
Exclude drafts from table of contents macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Nov 4, 2014
1 parent 335c470 commit 5093cdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/wiki/macros/toc.tid
Expand Up @@ -3,7 +3,7 @@ tags: $:/tags/Macro

\define toc-body(rootTag,tag,sort:"")
<ol class="tc-toc">
<$list filter="""[tag[$tag$]$sort$]""">
<$list filter="""[tag[$tag$]!has[draft.of]$sort$]""">
<li>
<$list filter="[is[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/></$view></$link>">
<$view field="caption">
Expand Down Expand Up @@ -75,7 +75,7 @@ tags: $:/tags/Macro

\define toc-expandable(tag,sort:"")
<ol class="tc-toc toc-expandable">
<$list filter="[tag[$tag$]$sort$]">
<$list filter="[tag[$tag$]!has[draft.of]$sort$]">
<$list filter="[is[current]toc-link[no]]" emptyMessage="<<toc-linked-expandable-body tag:'$tag$' sort:'$sort$'>>">
<<toc-unlinked-expandable-body tag:"$tag$" sort:"$sort$">>
</$list>
Expand Down Expand Up @@ -140,7 +140,7 @@ tags: $:/tags/Macro

\define toc-selective-expandable(tag,sort:"")
<ol class="tc-toc toc-selective-expandable">
<$list filter="[tag[$tag$]$sort$]">
<$list filter="[tag[$tag$]!has[draft.of]$sort$]">
<$list filter="[is[current]toc-link[no]]" variable="ignore" emptyMessage="<<toc-linked-selective-expandable-body tag:'$tag$' sort:'$sort$'>>">
<<toc-unlinked-selective-expandable-body tag:"$tag$" sort:"$sort$">>
</$list>
Expand Down

1 comment on commit 5093cdc

@tobibeer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think drafts should not be part of any lists unless a filter explicitly specifies it so. Just today I saw a draft pop up in a list as I was editing one of the list tiddlers. Rather confusing.

Please sign in to comment.