Sounds interesting to have the caption actually point to another tiddler. On the other hand, what's the title of that Movie tiddler then, if not its caption? What do you display as the tab title? Would be great if you could post some results in the end.so we can have a look at how that unfolds.
It's not. It's the name of a tiddler.
Ah, ok. Now I understand what you were after. Generally speaking, you can actually use the generic html a element, but it's not as convenient s the shorthand wiki syntax or the link widget version. In general, you can address tiddlers via anchors like so:
<$vars anchor="#$(title)$" title="Customise TiddlyWiki">
<a href=<<anchor>> class="tc-tiddlylink"><$text text=<<title>>/></a>
</$vars>
In the above, the link to the tiddler is created as an anchor, basically concatenating the # sign with the title stored in a $(variable)$ for substitution when rendered, I've given it the class tc-tiddlylink to have it look like an internal link. Not that I would know if and when that is useful, but just so you know that it does, in fact, work that way, too.
Next stop is to create a form tiddler that will collect the video info and generate an appropriately tagged tiddler for it so it will automatically appear in the "tabs" page, which will finish my video library/player app
Will be interesting to see, if and how you'll be implementing some sort of categorization.
For example, you could very well have "movie category tiddlers" that will automagically show a list of movie tabs at the bottom when you open them using some:
Conditional ViewTemplate Section @ tb5
e.g. "Drama" is a tiddler tagged "Movies" and "Garden State" and "Lost in Translation" are tiddlers tagged "Drama", then you could define a conditional ViewTemplate like so which should render tabs for the last two for the tiddler "Drama":
title: $:/_my/movies/tabs
tags: $:/tags/ViewTemplate
list-after: $:/core/ui/ViewTemplate/body
<$list filter="[all[current]tag[Movies]]">
<$vars state="$:/states/tabs/movies/$(currentTiddler)$">
<$set name="first" filter="[all[current]tagging[]limit[1]]">
<$set name="first" filter="[<title>get[caption]]" emptyValue=<<title>>>
<$macrocall $name=tabs tabsList="[all[current]tagging[]]" default=<<first>> state=<<state>>/>
</$set>
</$set>
</$vars>
</$list>
Now, there's plenty going on here, but after a bit of deciphering it's quite clear what's going on and how that works:
- we define some system tiddler tagged $:/tags/ViewTemplate to be shown after the general body / content of the tiddler:
- it's contents will only show anything, if the current tiddler is tagged Movies, hence a movie category
- the $list widget can be quite handy to conditionally display stuff
- but if you do, mind that it sets the currentTiddler, so use the "variable" attribute should you not want <<currentTiddler>> to change
- in this case, we're fine though, since we operate under the current tiddler using [all[current]]
- we define a state to be used for the tabs we render later based on the name of the movie category
- using this state, TiddlyWiki remembers the "open tab"
- the title of the state tiddler is any title you want, but I generally put it under "$:/states/whatever"
- I never save those (when saving the wiki) because they are not save-worthy to me
- MS Word also doen't remember if in the last session you had the file menu open, and so it opens that again, highlighting the last item you were hovering with your mouse
- we figure out a way to identify the first item to be shown in the tabs,
- because nothing is more awful than the a first tab not being displayed by default when the tabs are rendered
- so there's a set widget using a filter to determine the first tab tiddler, the first movie tiddler tagged with that movie category
- another set widget again uses a filter to fetch any caption for that tiddler, defaulting to the title... which is what TiddlyWiki stores in that tabs state
- I actually just created an issue to address this oddity:
#2701 allow user to define default for tabs as first title
https://github.com/Jermolene/TiddlyWiki5/issues/2701
- eventually we render the tabs
- you probably will / want to use a custom template for showing your movie details