mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-22 18:53:14 +00:00
update examples
This commit is contained in:
parent
8ea0290edc
commit
aef54cb947
49
editions/tw5.com/tiddlers/Examples_TOC_SimpleToc.tid
Normal file
49
editions/tw5.com/tiddlers/Examples_TOC_SimpleToc.tid
Normal file
@ -0,0 +1,49 @@
|
||||
created: 20240724070813184
|
||||
description: Simple TOC
|
||||
modified: 20240729112105751
|
||||
tags: $:/tags/wiki-test-spec
|
||||
title: Examples/TOC/SimpleToc
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
|
||||
title: Narrative
|
||||
|
||||
* The following code defines a "Simple Table of Contents" using "root" as the base tag
|
||||
* Click through all the tabs to get additional info
|
||||
|
||||
<$transclude $tiddler="Narrative-extended" $mode="block"/>
|
||||
|
||||
+
|
||||
title: root
|
||||
list: First Third Fourth
|
||||
|
||||
The list-field in the "root" tag-tiddler can be used to define the "sort order" of the TOC
|
||||
+
|
||||
title: First
|
||||
tags: root
|
||||
|
||||
1st 1st 1st 1st 1st
|
||||
+
|
||||
title: Second
|
||||
tags: First
|
||||
|
||||
2nd 2nd 2nd 2nd 2nd
|
||||
+
|
||||
title: Third
|
||||
tags: root
|
||||
|
||||
3rd 3rd 3rd 3rd 3rd
|
||||
+
|
||||
title: Fourth
|
||||
caption: fourth-caption
|
||||
tags: root
|
||||
|
||||
4th 4th 4th 4th 4th
|
||||
|
||||
This tiddler contains a caption, which will be shown in the TOC instead of the tiddler title
|
||||
+
|
||||
title: Output
|
||||
|
||||
<div class="tc-table-of-contents">
|
||||
<<toc tag:"root">>
|
||||
</div>
|
||||
|
@ -0,0 +1,48 @@
|
||||
created: 20240729105221520
|
||||
description: Simple TOC - tagField = tagLike
|
||||
modified: 20240729110636440
|
||||
tags: $:/tags/wiki-test-spec
|
||||
title: Examples/TOC/SimpleToc/tagField
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
|
||||
title: Narrative
|
||||
|
||||
* This test-case creates a "Simple Table of Contents" using "root" as the base tag
|
||||
* It uses a field named: ''tagLike'' which defines the TOC structure
|
||||
* Click through all the tabs to get additional info
|
||||
|
||||
<$transclude $tiddler="Narrative-extended" $mode="block"/>
|
||||
|
||||
+
|
||||
title: root
|
||||
|
||||
This is the base tag for a ''tagLike'' TOC
|
||||
|
||||
+
|
||||
title: First
|
||||
tagLike: root
|
||||
|
||||
1st 1st 1st 1st 1st
|
||||
+
|
||||
title: Second
|
||||
tagLike: First
|
||||
|
||||
2nd 2nd 2nd 2nd 2nd
|
||||
+
|
||||
title: Third
|
||||
tagLike: root
|
||||
|
||||
3rd 3rd 3rd 3rd 3rd
|
||||
+
|
||||
title: Fourth
|
||||
tagLike: root
|
||||
|
||||
4th 4th 4th 4th 4th
|
||||
|
||||
+
|
||||
title: Output
|
||||
|
||||
<div class="tc-table-of-contents">
|
||||
<<toc tag:"root" tagField:"tagLike">>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user