Hi Mike,
 

> I have a tiddler with tabs, each tab caption is the name of a video that 
> is also the name of a matching tiddler that has the <embed> markup to 
> YouTube.  I need to be able to use a link in the embedded tiddler to get to 
> that same tiddler, only stand alone, i.e. separate from the twiddler with 
> all the tabs, because it has additional controls such as Watched (uncheck 
> to unWatch, etc.)
>

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 quite odd to see that url be filled with the title. Video being 
>> defined as "My Favorite Movie", it's definitely not a URL for anything.
>>
>
> 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 
<http://tobibeer.github.io/tb5/#Conditional%20ViewTemplate%20Section>

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:

   1. we define some system tiddler tagged *$:/tags/ViewTemplate* to be 
   shown after the general body / content of the tiddler:
   2. it's contents will only show anything, if the current tiddler is 
   tagged *Movies*, hence a movie category
   3. 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 name of the state is what you want, but I generally put it 
      under "$:/states/whatever"
      - I never save those, 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
      4. 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
   5. eventually we render the tabs
      - you probably will / want to use a custom template for showing your 
      movie details
   
Best wishes,

Tobias.

-- 
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/f31cc4a8-4a68-43aa-b5a4-34e0068d5759%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to