I think it’s sometimes helpful to have a kind of hirarchy in TiddlyWiki. I have therefore created the titles with colon separated topics, so for example I have some tiddlers for TiddlyWiki plugins:
What I want is a link at the buttom of the above tiddlers to TiddlyWiki:Plugin. And then a link at the buttom of the tiddler TiddlyWiki:Plugin to TiddlyWiki.
I know this is possible with a ViewTemplate, but I struggle to get the right filter expression inside the list-links macro. I think I need to pass the currentTiddler title to a regular expression, which will remove everything after the last colon (including the last colon).
@Taltessy I am glad Eric helped you solve this issue, but I would just like to take the devil’s advocate position and warn against “compound titles”.
Experience and coding knowledge suggests this is unwise in the long run especially as titles are “unique keys” and what drives tiddlywiki.
There are host of other ways to capture relationships between tiddlers such as hierarchies’ which will also be easier to implement and have more possibilities. We can help you here to find these better ways.
Sure in simple cases this may work but it has a set of consequences if you want to move content between wikis, your wiki developes further, you want to leverage others existing tools and many more.
All I am saying is going forward, in future designs it is a good rule of thumb to;
@TW_Tones: I appreciate your recommendation against compound titles, but I have to admit that I do use them, too. Also, the $:/core is one big heap of compound titles and there exist filters (e.g. splitbefore) just to deal with them and create nice tables of content from that structure.
I do not use them for structuring – that’s what tag hierarchies are for – but just to make my titles as concise as possible (I use the caption field a lot to be more verbose).
On the other hand, I would be very frustrated with my compound titles were it not for Flibbles’ Relink Plugin. Because you are right, when structures change a tag is easily swapped, but until Relink a title was near forever, like a diamond. That’s why @Flibbles is my No.2 TW-Hero, after @jeremyruston of course.
So as an extensive user of compound titles I fully agree with your warning about compound titles.
Thanks for your recommendation. I really welcome any tips to avoid future problems. I would like to describe how I use the titles in more detail, but this was already perfectly done by @Yaisog :
I only use compound titles when it’s nearly impossible that the title will change in the future. Let’s take the example from above with TiddlyWiki:Plugin:Shiraz. There is nearly no chance that
Shiraz will be renamed (could be easily fixed with relink plugin)
Shiraz will be a general plugin for various software and therefore will not be a TiddlyWiki plugin only
TiddlyWiki will be renamed
So the compound title just gives me a concise title with the benefit that it’s a unique title. When I only use Shiraz as the title it could be about the city Shiraz or about the TiddlyWiki plugin. To solve this I could use a title like Shiraz the TiddlyWiki Plugin. Or I just use TiddlyWiki:Plugin:Shiraz. It’s also easy to identify from the title what could be inside the tiddler text.
Does this make sense or could this be solved better?
I remembered that Mohammad named his plugins after cities so I thought this is a perfect example of two things (city and TiddlyWiki plugin) which could have the same title but completely different meaning
One calls it compound titles, the other namespace.
Either way, I use my own namespace for naming content tiddlers, and tags for creating the hierarchy. Both not always match, but Relink helps.
Within the $:/core namespace (or my personal $:/ subspace), I spend waaaay too much time wondering how to structure tiddlers. If I have a separate StyleSheet for the SideBar, does it go under /ui/SideBar or under /ui/StyleSheets?
Only one thing is guaranteed: When I’m looking for them I’ll look in the wrong place first…
Have a decisive day
Yaisog
Absolutely true. – Naming tiddlers is hard. Especially, since we don’t see a pattern immediately. We have to have many tiddlers, that “do” similar things to see, how they should be categorized and may be re-named properly. .. I think it needs several iterations, to find a workable and “stable” structure. Maybe “trial and error” is part of the game here
It is clear we need to distinguish between the terms compound title (or key) and a title which uses a namespace, or as I illustrate a “unique or display title”. To reuse a well known phrase;
The tiddler title should be the title, the whole title and nothing but the title.
While naming tiddlers we can apply a naming standard such as the “structured subtiddlers” $:/top/middle/bottom to in effect add more information into the title, this is in effect a naming standard which arguably give rise to two “namespaces” that of $:/top/ and $:/top/middle/ it is not a compound title such as blog entry 2022/13/04 tiddlywiki which contains the type of tiddler “a blog” the “date” it refers to and the subject area “tiddlywiki”.
Now let me neuence my previous rule to avoid compound tiddler titles.
Now to be honest this example title blog entry 2022/13/04 tiddlywiki is not a problem, if it is intended to be a “display title” if contained within the tiddler we separately record the type/date and subject, be it with fields or tags. That is a “display title” may make a “unique title” for the tiddler, but we do not need to parse it because that is the only place we store the “type/date and subject”, as we have it elsewhere in the tiddler.
So here I refine my previous statement;
Avoid the use of compound titles as the only place to record more than one “key value”.
The truth is on the surface it is a “fine” distinction but, “on my word it is an important one”.
In other words
Except for the purpose of generating a unique key, avoid using the tiddler title as the only place to store more than one “key” piece of information, relating to what is contained within the tiddler. Otherwise when you want to search using one of these keys, you will need to “parse titles” just to find the key, before you even filter or search based on the key.