Substories not working as expected

83 views
Skip to first unread message

Jorge

unread,
Sep 7, 2020, 3:14:36 PM9/7/20
to TiddlyWiki

I have created a tiddler that contains two substories. The code I used, I just copied it from Tiddlywiki.com

The problem I encounter is that when I click on the first link to expand [[Flowchart]],  both substories expand, at the same time and with the same [[Flowchart]] substory. The same behaviour occurs with the second substory [[Pareto chart]].

Is there a way to expand one substory only.

Bear in mind, I am not a programmer, all can do is copy/paste code.

See code below:

<$navigator story="MySubStoryList" history="MySubHistoryList">
[[Flowchart]]
<$list filter="[list[MySubStoryList]]" history="MySubHistoryList">
<div>
<$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
<$transclude mode=block/>
</div>
</$list>
</$navigator>

<$navigator story="MySubStoryList" history="MySubHistoryList">
[[Pareto Chart]]
<$list filter="[list[MySubStoryList]]" history="MySubHistoryList">
<div>
<$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
<$transclude mode=block/>
</div>
</$list>
</$navigator>



Eric Shulman

unread,
Sep 7, 2020, 4:33:08 PM9/7/20
to tiddl...@googlegroups.com
On Monday, September 7, 2020 at 12:14:36 PM UTC-7, Jorge wrote:
I have created a tiddler that contains two substories. The code I used, I just copied it from Tiddlywiki.com
The problem I encounter is that when I click on the first link to expand [[Flowchart]],  both substories expand, at the same time and with the same [[Flowchart]] substory. The same behaviour occurs with the second substory [[Pareto chart]].
Is there a way to expand one substory only.

<$navigator story="MySubStoryList" history="MySubHistoryList">
[[Flowchart]]
<$list filter="[list[MySubStoryList]]" history="MySubHistoryList">
<div>
<$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
<$transclude mode=block/>
</div>
</$list>
</$navigator>

<$navigator story="MySubStoryList" history="MySubHistoryList">
[[Pareto Chart]]
<$list filter="[list[MySubStoryList]]" history="MySubHistoryList">
<div>
<$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
<$transclude mode=block/>
</div>
</$list>
</$navigator>



There problem with the above code is that each substory needs to use a separate "ID" for the story and the history.  Currently, both are using "MySubStoryList" and MySubHistoryList.  This needs to be changed in all four places it is used.  I suggest changing the first code block to use "FlowchartSubstory" and "FlowchartHistory" while the second code block could use "ParetoSubstory" and "ParetoHistory", like this:

<$navigator story="FlowchartSubstory" history="FlowchartHistory">
[[Flowchart]]
<$list filter="[list[FlowchartSubstory]]" history="FlowchartHistory">
<div>
<$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
<$transclude mode="block"/>
</div>

</$list>
</$navigator>

<$navigator story="ParetoSubstory" history="ParetoHistory">
[[Pareto Chart]]
<$list filter="[list[ParetoSubstory]]" history="ParetoHistory">

<div>
<$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
<$transclude mode="block"/>
</div>
</$list>
</$navigator>

That should fix the problem you are seeing and allow each substory to open separately.  Let me know how it goes...

enjoy,
-e

Jorge Vázquez Fernández

unread,
Sep 9, 2020, 2:20:19 AM9/9/20
to tiddl...@googlegroups.com
Thanks Eric! It worked perfectly.

Click this link to get started: GettingStarted
[[Pareto Chart]]
<div>
<$button message="tm-close-tiddler" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> <$view field="title"/>
<$transclude mode="block"/>
</div>
</$list>
</$navigator>

That should fix the problem you are seeing and allow each substory to open separately.  Let me know how it goes...

enjoy,
-e

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/KGEW6CnvAe0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/db3f32a7-82dd-4cc9-9cab-dd73233901b7o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages