Crazy idea, looking for help

Hi everyone

Today an idea occurred to me:

  1. A list-search of all tiddlers tagged ‘root’ (or whatever)
  2. where a custom list item template shows the toc macro for that item
  3. and each line of the toc would have a new tiddler button for quick creation of tiddlers that would appear under that line

This would form a list of outlines for key terms, and one can quickly search for and view the outline of a given term, and add new items in the outline.

I know how to do step one.

<<list-search

"[!is[system]all[tiddlers]tag[root]sort[title]search[]]"

"search:title"
"$:/temp/list-search-example"
"$:/.giffmex/listitemtoc"
placeholder:"" >>

I know how to do step three. Here is what I have in my list item template tiddler ($:/.giffmex/listitemtoc)

\define XXXXX

<b><$view field="title"/></b> <$button class="tc-btn-invisible"><$action-sendmessage
$message="tm-new-tiddler" tags={{!!title}}/> ^^{{$:/core/images/new-button}}^^</$button><br>

<<toc "XXXXX">><br>

Where I am stuck is I don’t know what to put in the define section and in the toc macro so that the toc is a table of contents of the tiddlers tagged to that list item. Thus my XXXX’s in those two spots.

Any ideas?

Got it: Just had to use a macrocall for the toc macro

<b><$view field="title"/></b> <$button class="tc-btn-invisible"><$action-sendmessage
$message="tm-new-tiddler" tags={{!!title}}/> ^^{{$:/core/images/new-button}}^^</$button><br>

<$macrocall $name="toc" tag={{!!title}} />