[TW5] Table of Contents Where Children Contain Source Tag and Parent Tag

60 views
Skip to first unread message

Taylor Jensen

unread,
Aug 10, 2016, 1:52:52 AM8/10/16
to TiddlyWiki
Is it possible for me to make a table of contents where not only does it nest, but also matches all children entries to the first tag?

Say I do:

<$macrocall
    $name="toc-tabbed-internal-nav"
    tag="location"
    selectedTiddler="$:/temp/toc/selectedTiddler"
    unselectedText="<p>Select a topic in the table of contents. Click the arrow to expand a topic.</p>"
    missingText="<p>Missing tiddler.</p>"
/>

<!--{{{ [tag[location]] }}}--><!--old style-->

And I have tiddlers:

"Location A" tagged "Location"
"Location B" tagged "Location, Location A"
"NOT A LOCATION" tagged "Location A"

I want "Location A" to show up in the toc, with "Location B" nested under it, but not have "NOT A LOCATION" nested because it doesn't have the tag "Location". But with the call I made "NOT A LOCATION" would show up nested under "Location A" because the toc has stopped worrying about the source tag. Is there built in functionality for this or do I need top copy and modify the existing toc macro code?

-TCJ

Jed Carty

unread,
Aug 10, 2016, 3:10:34 AM8/10/16
to TiddlyWiki
I made something similar to that here. It keeps track of all parent, grandparent etc. tags instead of just the root tag. It could probably be modified to track only the root tag though.
Reply all
Reply to author
Forward
0 new messages