diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index fadd4ba91..5911c584c 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -163,17 +163,24 @@ tags: $:/tags/Macro \end \define toc-tabbed(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText) -<$linkcatcher to="$selectedTiddler$"> <$tiddler tiddler={{$selectedTiddler$}}>
+<$linkcatcher to="$selectedTiddler$">
<$macrocall $name="toc-selective-expandable" tag="""$tag$""" sort="""$sort$""" itemClassFilter=<>/>
+

<$view field="caption"><$view field="title"/>

<$transclude mode="block">$unselectedText$
+\end + +\define toc-tabbed-internal-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText) +<$linkcatcher to="""$selectedTiddler$"""> +<$macrocall $name="toc-tabbed" tag="""$tag$""" sort="""$sort$""" selectedTiddler="""$selectedTiddler$""" unselectedText="""$unselectedText$"""/> \end + diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Tabbed Example.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Tabbed Example.tid index 5dc6b5ca8..58f1c3cb2 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Tabbed Example.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Tabbed Example.tid @@ -4,6 +4,24 @@ tags: table-of-contents-example !! Tabbed Table of Contents +The tabbed table of contents macro renders a selective expandable table of contents with an attached panel that displays the currently selected tiddler. + +!!! Internal navigation + +This example shows how to construct a tabbed table of contents with internal navigation, so that clicking links in the displayed tiddler will replace the displayed tiddler. + <$macrocall $name='wikitext-example-without-html' -src='<> +src='<> + '/> + +!!! External navigation + +This example shows how to construct a tabbed table of contents with external navigation, so that clicking links in the displayed tiddler will open those tiddlers in the story river in the usual way. + +<$macrocall $name='wikitext-example-without-html' +src='<> + +'/> + +