From 48052130d25447935e916f4a193eebf211d417cd Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 15 Nov 2014 12:29:46 +0000 Subject: [PATCH] Clarify toc-tabbed macro --- core/wiki/macros/toc.tid | 4 ++-- .../demonstrations/TabbedExampleType.tid | 3 +++ .../TableOfContentsMacro Tabbed Example.tid | 19 ++++++++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 editions/tw5.com/tiddlers/demonstrations/TabbedExampleType.tid diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index 5911c584c..6359f0abd 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -162,7 +162,7 @@ tags: $:/tags/Macro [all[current]field:title{$selectedTiddler$}] \end -\define toc-tabbed(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText) +\define toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText) <$tiddler tiddler={{$selectedTiddler$}}>
<$linkcatcher to="$selectedTiddler$"> @@ -180,7 +180,7 @@ tags: $:/tags/Macro \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$"""/> +<$macrocall $name="toc-tabbed-external-nav" tag="""$tag$""" sort="""$sort$""" selectedTiddler="""$selectedTiddler$""" unselectedText="""$unselectedText$"""/> \end diff --git a/editions/tw5.com/tiddlers/demonstrations/TabbedExampleType.tid b/editions/tw5.com/tiddlers/demonstrations/TabbedExampleType.tid new file mode 100644 index 000000000..8771da3d4 --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/TabbedExampleType.tid @@ -0,0 +1,3 @@ +title: TabbedExampleType + +toc-tabbed-internal-nav \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Tabbed Example.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Tabbed Example.tid index 58f1c3cb2..dad1ea333 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Tabbed Example.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Tabbed Example.tid @@ -10,18 +10,23 @@ The tabbed table of contents macro renders a selective expandable table of conte 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='<> - -'/> +``` +<> +``` !!! 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='<> +``` +<> +``` -'/> +!! Example +Type: <$select tiddler="TabbedExampleType"> + + + +<$macrocall $name={{TabbedExampleType}} tag="TableOfContents" selectedTiddler="$:/temp/toc/selectedTiddler" unselectedText="Select a topic in the table of contents. Click the arrow to expand a topic."/>