removeprefix within tabs / tabslist

Visto 19 veces
Saltar al primer mensaje no leído

david.j....@gmail.com

no leída,
25 nov 2020, 14:14:3525/11/20
a 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

no leída,
25 nov 2020, 14:22:3325/11/20
a 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

no leída,
25 nov 2020, 14:44:0225/11/20
a TiddlyWiki
That's great, thanks! Then all I have to do is <<tabs tabsList:"[prefix[$:/Chapter1/]]">>
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos