1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-28 12:29:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/howtos/Creating SubStories.tid

45 lines
1.1 KiB
Plaintext
Raw Normal View History

2014-02-14 22:22:41 +00:00
created: 20140214215718317
2014-09-19 16:18:25 +00:00
modified: 20140919161514318
tags: Learning
2014-02-14 22:22:41 +00:00
title: Creating SubStories
type: text/vnd.tiddlywiki
This example shows how to create a sub-story within a tiddler that is independent of the main story.
Here's the code:
```
<$navigator story="MySubStoryList" history="MySubHistoryList">
Click this link to get started: HelloThere
<$list filter="[list[MySubStoryList]]" history="MySubHistoryList">
<div>
2014-04-03 17:10:54 +00:00
2014-08-28 20:43:44 +00:00
! <$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
2014-02-14 22:22:41 +00:00
<$transclude/>
</div>
</$list>
</$navigator>
```
Note how you can open the HelloThere tiddler in the substory by clicking on the link below. Links within the substory open within the substory, and not in the main story.
<$navigator story="MySubStoryList" history="MySubHistoryList">
Click this link to get started: HelloThere
<$list filter="[list[MySubStoryList]]" history="MySubHistoryList">
<div>
2014-02-21 09:07:46 +00:00
2014-08-28 20:43:44 +00:00
! <$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
2014-02-14 22:22:41 +00:00
<$transclude/>
2014-02-21 09:07:46 +00:00
2014-02-14 22:22:41 +00:00
</div>
</$list>
</$navigator>