이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

Creating SubStories

2021년 11월 27일 오전 3:22

This example shows how to create a sub-story within a tiddler that is independent of the main story. The NavigatorWidget and ListWidget work together to:

  1. Add tiddlers to the story when links are clicked. Navigate to the tiddler corresponding to the link click. (story attribute of the NavigatorWidget)
  2. Remove tiddlers from the story when tiddler close buttons are clicked. (story attribute of NavigatorWidget)
  3. Animate the opening and closing of tiddlers. (storyview attribute of the ListWidget)
  4. Display the list of open tiddlers. (filter and template attributes of the ListWidget)
  5. Display tiddlers in draft mode. (editTemplate attribute of the ListWidget)
  6. Track navigation history. (history attribute of both NavigatorWidget and ListWidget)
  7. And more!

Here is the example code (see also StateMechanism for related discussion):

<$navigator story="$:/temp/DemoStoryList" history="$:/temp/DemoHistoryList">

{{$:/core/ui/SideBarSegments/search}}

<$list
  filter="[list[$:/temp/DemoStoryList]]"
  history="$:/temp/DemoHistoryList"
  template={{$:/config/ui/ViewTemplate}}
  editTemplate={{$:/config/ui/EditTemplate}}
  storyview="classic"
  emptyMessage="Use search box above. Clicked search links will open here instead of in the main story.<p>No search ideas? Click this link to get started: HelloThere</p>"/>

</$navigator>

That renders as:

Use search box above. Clicked search links will open here instead of in the main story.

No search ideas? Click this link to get started: HelloThere