Shareda,

I tend not to need what you are asking for because I close unwanted 
tiddlers, use close others or close all as needed. 

However I can see how this may be useful. I have also made a tools to track 
the current sessions history.

In this case you are asking that on opening one tiddler it closes another. 
For this reason I suggest creating a button to do the opening and use that 
to open tiddlers and simultaneously close the "excess tiddler". You can use 
the link catcher to capture the name of the tiddler to open, then use its 
actions parameter to trigger open tiddler and the close.

Lets assume you are happy to use the story list this solution works, but 
since it will itself be closed I have put it in the sidebar 

Tag with $:/tags/SideBar
\define close-tiddler-action(tiddlername) 
<$set name=tiddlername value="$(currentTiddler)$" emptyValue=<<
currentTiddler>> >
<$action-sendmessage $message="tm-close-tiddler" $param="SampleWizard"/>
</$set>
\end
\define open-close-behind() 
<$list filter="[enlist{$:/StoryList!!list}nth[3]]">
<$action-sendmessage $message="tm-close-tiddler" $param=<<currentTiddler>>/>
</$list>
<$action-navigate $to=<<navigateTo>>/>
\end

$:/temp/last-opened=<$link to={{$:/temp/last-opened}}/>

<$linkcatcher to="$:/temp/last-opened" actions=<<open-close-behind>> >
{{TableOfContents}}
</$linkcatcher>

Note: 

   - for testing this closes the third, alter nth(3] to nth[10]
   - The close-tiddler-action definition is not in use

Regards
Tones



On Friday, 30 October 2020 21:55:22 UTC+11, Shareda wrote:
>
> Hello! Maybe someone knows some plugin doing something like this. If there 
> are 10 tiddlers already open then the first one is closed automatically  
> when navigating to the 11th one. 
>
> As I understand there should be navigate history and the navigate event to 
> do that.  
> Now I found the LinkCatcherWidget. But I'm not sure where I can get the 
> list of recent navigations. Does anyone know that? Or how i can get that 
> list from 
>
> If I get it then I plan to 
> 1. Place the LinkCatcherWidget to the PageTemplate with
> 2. Filter [<nav_history>rest[10]] tiddlers
> 3. Apply WidgetMessage: tm-close-tiddler.
>
> Is this a good plan?
>  
> That would be super great to forget about finding and closing old tiddlers.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/754899be-56e5-4453-bed7-0c3cffb6c43fo%40googlegroups.com.

Reply via email to