More questions about TITLE

180 views
Skip to first unread message

Josiah

unread,
Jun 6, 2016, 2:28:52 PM6/6/16
to TiddlyWiki
Let me present a use case:

A TiddlyWiki which discusses film. Take the case of the film KUNDUN (1997). That ...
  1. I create a data record for listing actors, director etc ...
  2. I create a video Tiddler for that film ... (https://www.youtube.com/watch?v=mqWjYtYWVDE)
  3. I create 3 different posts to Twitter about that film ...

What I WANT to do is title them ALL "Kundun (1997)". I will differentiate them by tags (e.g. data / filmClip / tweet)


Is this possible?


Best wishes

Josiah


Hegart Dmishiv

unread,
Jun 6, 2016, 2:48:17 PM6/6/16
to TiddlyWiki
As far as I understand it, that cannot be done with the title field. That's not to say it cannot be done at all though. Just use a different field. Think of the title field as being like the primary key of a database. It is the only field in TiddlyWiki (that I know of) which has to be unique. You can even use a custom ViewTemplate to display your custom field (with non-unique contents) in place of the title field, using the technique I demonstrated before.

Hope this helps,

Hegart.

Josiah

unread,
Jun 6, 2016, 3:36:24 PM6/6/16
to TiddlyWiki
Thanks. The workarounds may work. I will look.

I'm just surprised that tiddler creation is not behind-the-scenes auto-serialized so that everything else showable is repeatable. Perhaps it is?

Josiah

Mat

unread,
Jun 6, 2016, 6:05:05 PM6/6/16
to TiddlyWiki
Hegart is right.

In addition, I believe Felix's TiddlyMap uses other unique identifiers than the titles. Also I believe Tobias has done work with UUID's or similar, for tiddlers. Maybe findable via tb5.tiddlyspot.com

<:-)

Richard Smith

unread,
Jun 6, 2016, 8:21:48 PM6/6/16
to TiddlyWiki
Hi,

As Hegart points out, the tension derives from the fact that the title is the primary key in the data-store. 

How would you differentiate between your three tweets if they have the same title and tags?

The best/simplest way to do this, in my experience, is to give them all names that start the same "KUNDUN (1997) Cast", "KUNDUN (1997) Clip" etc. and then have a 'master' tiddler called "KUNDUN (1997)" which gathers all the pieces (by transcluding all the tiddlers prefixed with it's own title). This way a search for "KUNDUN (1997)", for example, will return a list of meaningful titles instead of "KUNDUN (1997)" 5 times, which is not very informative. The other advantage to this is you could make a button to create new tweets about the film and take advantage of automatic incrementation ie; "KUNDUN (1997) Tweet #1", "KUNDUN (1997) Tweet #2" etc.

The other mechanism that's available is the 'caption' field - multiple tiddlers can have the same caption field and, if it's present, it gets used in favour of the title when the tiddler is displayed in certain contexts, like when the tiddler is used as a tab in the sidebar or elsewhere.

It should be possible to beef-up use of the caption field (by re-writing the view templates?), so that it is displayed as the tiddler title when present - basically start to try and separate the "human readable titles" from the "data-store keys" but this is likely to be a bit of a rabit-hole, there are good reasons for TW being how it is and I'm sure Jeremy is entirely cognisant of the trade-offs he's made in this area.

Bear in mind that if all 5 of your tiddlers end up with the same title, you will no longer be able to refer to any of them by that title, so you will need to remember, or easily refer to, their individual primary-keys and thus some of the 'magic' of tiddlywiki is lost and you're a database administrator.

Are you using TW for both creating and displaying the content? Are you able to post an example of your work so far or examples showing how you would like it to work? In my experience, the best solution to your problem will depend on the workflow you are trying to achieve.

Regards,
Richard

Hegart Dmishiv

unread,
Jun 6, 2016, 9:02:56 PM6/6/16
to tiddl...@googlegroups.com
Hi Josiah,

Further to what Richard has said,


The best/simplest way to do this, in my experience, is to give them all names that start the same "KUNDUN (1997) Cast", "KUNDUN (1997) Clip" etc. and then have a 'master' tiddler called "KUNDUN (1997)" which gathers all the pieces (by transcluding all the tiddlers prefixed with it's own title). This way a search for "KUNDUN (1997)", for example, will return a list of meaningful titles instead of "KUNDUN (1997)" 5 times, which is not very informative.

Using this technique as described, you can also make use of the removeprefix Operator when listing the tiddlers prefixed with KUNDUN (1997). Also, you can simplify your filter by filtering on the title field itself, using Richard's example. Here's some code you could use in those 'master' tiddlers.

<$list filter="[prefix{title}]">

* <$link field="title"><$view field="
custom-field" /></$link>
</$list>

This will generate a bulleted list of the tiddlers which are prefixed with the title of the current tiddler, and link to them while displaying instead the content of some other custom field. You could either place this code directly into your 'master' tiddlers, or better yet, put it into a ViewTemplate which is filtered by a tag identifying all those 'master' tiddlers.

Hope this helps,

Hegart.

Xavier Cazin

unread,
Jun 7, 2016, 3:35:20 PM6/7/16
to tiddl...@googlegroups.com
Hello,

Adding my 2 cts: we used a simple approach for the fr and the es edition of tw5 documentation (see for example http://tiddlywiki.com/prerelease/languages/fr-FR/index.html).

We wanted to keep the original (english) title untranslated in order to keep crossed references safe, so we just added the fr-title (resp. es-title) fields, which get rendered instead of the en title thanks to the ViewTemplate mecanism: the <$view field="title"/> in $:/core/ui/ViewTemplate/title is merely replaced with
<$view field="fr-title">
<$view field="title"/>
</$view>

Cheers,
X.

-- Xavier Cazin

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/ad90a6b8-78c0-431d-9a1e-00a39f738e0a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Josiah

unread,
Jun 8, 2016, 6:13:47 AM6/8/16
to TiddlyWiki
Thankyou ... Hegart, Mat, Richard Smith & Xavier.

All those answers are helpful in giving me better understanding of how I could go forward.

Best wishes
Josiah
Reply all
Reply to author
Forward
0 new messages