mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-26 15:23:15 +00:00
Clarify toc-tabbed macro
This commit is contained in:
parent
21cc5fc1d6
commit
48052130d2
|
@ -162,7 +162,7 @@ tags: $:/tags/Macro
|
||||||
[all[current]field:title{$selectedTiddler$}]
|
[all[current]field:title{$selectedTiddler$}]
|
||||||
\end
|
\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$}}>
|
<$tiddler tiddler={{$selectedTiddler$}}>
|
||||||
<div class="tc-tabbed-table-of-contents">
|
<div class="tc-tabbed-table-of-contents">
|
||||||
<$linkcatcher to="$selectedTiddler$">
|
<$linkcatcher to="$selectedTiddler$">
|
||||||
|
@ -180,7 +180,7 @@ tags: $:/tags/Macro
|
||||||
|
|
||||||
\define toc-tabbed-internal-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText)
|
\define toc-tabbed-internal-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText)
|
||||||
<$linkcatcher to="""$selectedTiddler$""">
|
<$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$"""/>
|
||||||
</$linkcatcher>
|
</$linkcatcher>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
title: TabbedExampleType
|
||||||
|
|
||||||
|
toc-tabbed-internal-nav
|
|
@ -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.
|
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='<<toc-tabbed-internal-nav tag:"TableOfContents" selectedTiddler:"$:/temp/toc/selectedTiddler" unselectedText:"Select a topic in the table of contents. Click the arrow to expand a topic.">>
|
<<toc-tabbed-internal-nav tag:"TableOfContents" selectedTiddler:"$:/temp/toc/selectedTiddler" unselectedText:"Select a topic in the table of contents. Click the arrow to expand a topic.">>
|
||||||
|
```
|
||||||
'/>
|
|
||||||
|
|
||||||
!!! External navigation
|
!!! 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.
|
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='<<toc-tabbed tag:"TableOfContents" selectedTiddler:"$:/temp/toc/selectedTiddler" unselectedText:"Select a topic in the table of contents. Click the arrow to expand a topic.">>
|
<<toc-tabbed-external-nav tag:"TableOfContents" selectedTiddler:"$:/temp/toc/selectedTiddler" unselectedText:"Select a topic in the table of contents. Click the arrow to expand a topic.">>
|
||||||
|
```
|
||||||
|
|
||||||
'/>
|
!! Example
|
||||||
|
|
||||||
|
Type: <$select tiddler="TabbedExampleType">
|
||||||
|
<option value="toc-tabbed-internal-nav">Open tiddler links internally (toc-tabbed-internal-nav)</option>
|
||||||
|
<option value="toc-tabbed-external-nav">Open tiddler links externally (toc-tabbed-external-nav)</option>
|
||||||
|
</$select>
|
||||||
|
|
||||||
|
<$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."/>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user