removeprefix within tabs / tabslist

24 views
Skip to first unread message

david.j....@gmail.com

unread,
Nov 25, 2020, 2:14:35 PM11/25/20
to TiddlyWiki
Say if I have some tiddlers arranged something like
$:/Chapter1
$:/Chapter1/Section1
$:/Chapter1/Section2
$:/Chapter1/Section3

And I would like to display them in tabs within the $:/Chapter1 tiddler to show all of the sections, but also trim off the first part of the path (so only show tab headings of Section1, Section2, etc. instead of the full $:/Chapter1/Section1),

Is there any easy away to do something like <<tabs tabsList:"[removeprefix[$:/Chapter1/]]">> ?  If I do this though, it creates tabs with names "Section1", but there is nothing there because it is trying to show "Section1" and not "$:/Chapter1/Section1"

Thanks,
David

David Gifford

unread,
Nov 25, 2020, 2:22:33 PM11/25/20
to TiddlyWiki
You can use a caption field for each tiddler to control what will be displayed in the tab for that tiddler. So in $:/Chapter1/Section3 add a caption field and type Section3 in that field. It will display in the tab as Section3

david.j....@gmail.com

unread,
Nov 25, 2020, 2:44:02 PM11/25/20
to TiddlyWiki
That's great, thanks! Then all I have to do is <<tabs tabsList:"[prefix[$:/Chapter1/]]">>
Reply all
Reply to author
Forward
0 new messages