Creating substories with edition

88 views
Skip to first unread message

Luis Gonzalez

unread,
Oct 8, 2019, 8:20:35 AM10/8/19
to TiddlyWiki
I'm trying to create a tiddler with substories. All tiddlers tagged with "Microwiki"  must open in that tiddler.

The code is:

<$navigator story="MySubStoryList" history="MySubHistoryList">


<$list filter="[tag[Microwiki]]" history="MySubHistoryList" template="$:/core/ui/ViewTemplate"   editTemplate="$:/core/ui/EditTemplate">
<div>

<$transclude/>
</div>
</$list>

<hr/>

</$navigator>


I want  to edit that tiddlers inside this main one as the same way as the main tiddlywiki: it changes from view mode to edit mode in the same position. The problem is when I pick the edit icon the tiddler opens in edit mode under all tiddlers of the story but it keesp the original tiddler open in view mode above the story river.


I cant imagine what is the way to do this.

Mark S.

unread,
Oct 8, 2019, 11:09:17 AM10/8/19
to TiddlyWiki
I would be glad to hear if there's a more elegant way, but I think you have to make your own edit buttons and then apply templates accordingly:

<$navigator  story="MySubStoryList" history="MySubHistoryList">

<$list filter="[tag[Microwiki]]" history="MySubHistoryList"  >
<$set name="mystate" value={{{ [<currentTiddler>addprefix[$:/temp/]] }}} >
<div>

<$button set=<
<mystate>>  setTo="edit">Edit</$button>
<$button set=<
<mystate>>  setTo="">Show</$button>

<$reveal type=match text="edit" stateTitle=<
<mystate>> stateField="text"  >
<$transclude tiddler="$:/core/ui/EditTemplate"/>
</$reveal>
<$reveal type=nomatch text="edit" stateTitle=<
<mystate>> stateField="text" >
<$transclude tiddler="$:/core/ui/ViewTemplate"/>
</$reveal>

</div>
</$set>
</$list>

<hr/>

</$navigator>

This immediately brings up new problems in terms of display, and you want to make your own view and edit templates. With the edit template, for instance, you probably want to edit the "title" field.

Good luck!

TonyM

unread,
Oct 8, 2019, 6:45:06 PM10/8/19
to TiddlyWiki
Luis,

I am not completely sure of your desired result but can I suggest (ironically since mark replied) you have a look at Mark S's twoutliner. It uses a variation of toc navigate internal to allow you to edit related tiddlers within a toc tiddler. You could create a link/buttons to open in the main story if desired.

Regards
Tony

Luis Gonzalez

unread,
Oct 9, 2019, 4:21:40 AM10/9/19
to TiddlyWiki
My initial goal  is to write the manual that people refer to in different messages.

The first task is is to understand tiddlywiki:
  • The tw elements
  • Using tw: tiddlers, tags, filters...
  • Customization of tw interface
  • The internals: Storyriver, etc.
My current effor is to understand the story river and the way tw draws the tiddlers in the story.


If any of you want to collaborate, please email me and we will start writting the articles.


Reply all
Reply to author
Forward
0 new messages