Pedro,
You will notice in the macro I provided show-tabset I set the state field
as
<$set name=state value=<<qualify $:/temp/tabset-here-state>> >
This makes a state tiddler unique for each Tiddler
I think you may still make use of saving the state, if an intermediate user
opens the advanced tab let it remain so when they return.
However if you have a tiddler somewhere containing the current users
"level" eg $:/config/studentlevel you can make a new macro (recommended) or
change mine such that the line
<$macrocall $name=tabs tabsList=<<tabs-in>> state=<<state>> />
Sets the default here
<$macrocall $name=tabs tabsList=<<tabs-in>> state=<<state>> default=<
<default-tab>> />
Now we need to define the default-tab macro
\define default-tab() [[$(currentTiddler)$-{{$:/config/studentlevel}}]]
Then until the user changes the tab, the tab with the title in
$:/config/studentlevel
<<default-tab>>
will display first.
Caveats
- I have not tested the above code
- It depends on your consistently naming tabs etc... careful with case
except in the caption field(s)
Regards
Tony
On Wednesday, July 17, 2019 at 5:30:37 AM UTC+10, pedruchini wrote:
>
> Tony,
>
> Here is my use case (simplified). I'm teaching a foreign language and...
>
> for the tiddler 'Adverbs' I would like to have three tabs:
>
> Beginners - Intermediate - advanced
>
> Now, since the students who are consulting this tiddlywiki are at
> intermediates's level I would like the tab 'intermediate' be selected by
> default.
>
> The other two tabs allow these students to brush up on their beginners
> level o to extend their knowledge to the advanced level, but the main tab
> should be 'Intermediate'. That's why it would be nice to have a tab
> selected by default.
> As for states, in the tiddler '$:/core/ui/ViewTemplate/title' I added
> this:
>
> <$action-deletetiddler $filter="[prefix[$:/state/]]"
>
> to clear all states (in fact I created a second 'close botton' to 'close
> and clear all states').
>
> Therefore, it won't use the last selected tab, but the default tab.
>
> Pedro
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/5b570c5c-93c2-483a-9c44-dfedb7f46449%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.