Hey,

I try to build some sort of "TOC-toggle" where I want to remove not used 
TOC-Tiddlers temporarily so that they won't be displayed in the TOC.
The TOC is structured like this:

01
  010
   011
      0110
          01100
          01111
      0111
02
...

I already found a way to bring back TOC-Tiddler with the following code:
<$button>
<$fieldmangler tiddler=<<currentTiddler>>>
<$set name="digit-pattern4" value="(^[0-9]{5}\s)">
<$list filter="[is[tag]!tag[#]has[toc_inactive]regexp:title<digit-pattern4>
]">
<$action-setfield $field='tags' $value={{!!toc_inactive}}/>
<$action-deletefield toc_inactive/>
</$list>
<$set name="digit-pattern3" value="(^[0-9]{4}\s)">
<$list filter="[is[tag]!tag[#]has[toc_inactive]regexp:title<digit-pattern3>
]">
<$action-setfield $field='tags' $value={{!!toc_inactive}}/>
<$action-deletefield toc_inactive/>
</$list>
<$set name="digit-pattern2" value="(^[0-9]{3}\s)">
<$list filter="[is[tag]!tag[#]has[toc_inactive]regexp:title<digit-pattern2>
]">
<$action-setfield $field='tags' $value={{!!toc_inactive}}/>
<$action-deletefield toc_inactive/>
</$list>
<$set name="digit-pattern1" value="(^[0-9]{2}\s)">
<$list filter="[is[tag]!tag[#]has[toc_inactive]regexp:title<digit-pattern1>
]">
<$action-setfield $field='tags' $value={{!!toc_inactive}}/>
<$action-deletefield toc_inactive/>
</$list>
</$set>
</$set>
</$set>
</$set>
</$fieldmangler>
</$button>

The Problem is, that I have to click four times. ;-)

Is there a simple way to do it in one click?

Regards
The Bo

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e53c8476-aa78-429d-b868-1f7faf8399d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to