[Help] regarding Caption and Title

How could I replace the Title field at the top of the tiddlers with Caption, and have a smaller field beneath it for the actual title, just above the tags? something like:

<title>Caption</title>
<sub>Title</sub>
<sub>[creator] [modified]</subtitle>
<subtitle>[tags]</subtitle>

Reason for this, is that I use a naming system like Wikipedia, which is “Topic (Parent Topic)” ie “Sokka (Avatar: The Last Airbender)” which can appear very long with certain topics, so to remedy this, having just “Sokka” (or whatever the caption is) as the tiddler header would help.

I use this method because I keep all of my things in a single (constantly backed up) TW for easy access, as I found myself neglecting and TW I wasn’t currently working on, or just flat out forgetting about their existence entirely.

Anyways, any help with this is greatly appreciated!

for anyone curious, yes- transclusion with a long title is a difficulty, so instead of typing and retyping the whole title, I usually use a macro, something like <<ATLA "Sokka">> to create [[Sokka|Sokka (Avatar: The Last Airbender)]] (just an example.)

any alternatives to this are welcome! just felt like sharing that tidbit while waiting to see what others reply with to the main topic.

G’day Justin,

Nothing fancy:

This is a good start!

Only thing, is that the main title is still at the top and quite large, and still functions as the title.

my aim is for the caption field to replace the title in all it’s function (sticky title, for example) and the main title being small text below it, that hides when the tiddler is folded.

I’ll try to make a visual demo of what I’m attempting!

One step/problem at a time.

For the least amount of futzing, consider showing the large caption after the small title.

And make the title even smaller and/or maybe some shade of gray.

Well, unfortunately doing that causes issues with sticky titles, and doesn’t seem to work with folded tiddlers.

Here is the concept I made for reference, showing what i would like to do as an end result.

I don’t know how to, but I imagine making my own ViewTemplate and EditTemplate is what i’ll have to do.

I think i can achieve it by duplicating and changing them a tad, but I’m not sure how to make my dupicated ones replace the default ones.

Then scratch everything so far, and edit the following core tiddler as per the last three lines in this image:

(uh, don’t go deleting the lines after that, rather insert those three lines at that spot.)

To avoid making changes all over the place in this core tiddler, adjust the appearance of the tiddler title as per the css in the earlier screenshot. (That CSS makes the title of a tiddler smaller only if the tiddler has a caption. If all of your tiddlers will have captions or you don’t care if “caption-less” tiddlers have smaller titles, then that css can be reduced to .tc-tiddler-title h2 {font-size:0.5em;color:gray;} )

I have to step away for a bit, but so far this is turning out quite well!

I’ve made the changes to the ViewTemplate and I’m going to go with your previous CSS.

Good stuff, Justin.

Although I tend to avoid modifying core tiddlers, there is zero reason to fear fiddling with them.

Do take note of what core tiddlers you modify. That is helpful when you upgrade your TiddlyWiki to a new version.

I’ve been meaning to do a video about that, now I have double the reason.

Cheers !

I think ideally once this is done, I will look into making it a plugin, so any changes to core tiddlers can be reverted, or atleast I think that is how plugins typically work.

dunno, but I should focus on the main task at hand., I should be back to my computer shortly!

I actually did something similar but for the almost opposite reason.

I like descriptive titles so if I need to share a permalink they end up long and hard to read. So I named my tiddler with a short name; thus have a short readable permalink, and if a tiddler has the alt-title field it will use that for the tiddlers title, when viewing it in the viewTemplate, as soon as you edit it you see the real title.

Basically you need to add the alt-title field to the tiddler and if it exists uses it, but if it is empty it tries to use the caption or system-caption (A field I use) to display the title.

  • It also honors the way system tiddlers titles are displayed.

I have not published it or tested it thoroughly for publishing but try this on tiddlywiki.com;
alternate-title.json (2.2 KB)

But of course you could change the condition in which this method is used. Eg in $:/PSaT/alternate-title/title-filter

Currently [all[current]has:field[alt-title]then[$:/PSaT/alternate-title/title]]
Change to [all[current]] for all tiddlers.

In future I plan to add the ability or provide the alt-title in a separate tiddler if you want to give core tiddlers a different name without editing them.

This is fascinating!, though it can cause problems for a user looking for a tiddler that could have a field:alt-title that is different from the title itself. hm…

functionally though, it’s very well done. It’s funny how we both had opposite concepts and similar goals.

now all I have to do is add a fixed field above the title field in the EditTemplate and its pretty much good to go!

If you don’t mind explaining how, is there a way I can transclude the tiddler title below the alt-title in a similar format as the modified date?

Edit: Nevermind, I’ve found a method that works!

All modifications can be found here: CaptionAsMainTitle.json (2.6 KB)

Thank you guys for all the help with this!

1 Like

The caption field is mainly used for “short titles” that can be used in the tab-macro for example. …

While the “subtitle” field isn’t used at tw-com, I personally use it if I need a longer “subtitle”.

Because my titles-look-like-this, so I can define them and get “pretty links” when I use the “permalink” function. I use my alias-plugin, to link between tiddlers in wikitext.

I don’t use the title as a heading. My heading 1 is part of the wikitext, so it can be easily transcluded into other tiddlers.

My wikis look more like this: theme: slant-01 — an opinionated theme by pmario

Huh, that’s an interesting take on it. I hadn’t considered how my tiddler title format would look as far as permalinking goes. I might adopt this into my own formatting standards, or use a difference &nbsp; alternative, like underscores.

what do you mean, as far as a longer subtitle, if you don’t mind me asking?

do you happen to have a demo of your alias plugin? I’m curious about how it works!

Also, I’m not going to lie- the smaller header is very appealing, aesthetically speaking.

Funny you should ask;

I submitted an issue on GitHub requesting the hackability of the tiddler subtitle, in which the tiddlers tagged $:/tags/ViewTemplate/Subtitle appear in the subtitle.

1 Like

I try hard, to create tiddlers titles, that I can remember. They basically follow 2 rules, so I don’t need to think about, how I need to create them.

  • all lowercase
  • use hyphens to mark word boundaries

The uni-link plugin allows me to link to a tiddler with eg: [[AGT|?s]] and show the subtitle field which contains “Alexander the Great” instead of the title alexander-the-great or AGT which could be interpreted differently :wink:

Uni-link basically allows me to use any name to link to a tiddler and show any field as the link text. Because I’m lazy I want to use short links and still have maximum readability.

It’s called uni-link plugin. It basically extends the core wikilink syntax [[alias-name|?]] in a somewhat backwards compatible way. It contains a link to an intro video

https://wikilabs.github.io/editions/uni-link/

I needed to make the title smaller, because it would otherwise interfere with the heading 1 in the tiddler text.

The theme isn’t optimized for accessibility. So it may be confusing for screen reader users.

I also use the description field a lot, to create “meaningful lists”.

1 Like

That could be interesting!

It would be nice if a way is found to have the icon appear to the left of both the title and subtitle (not 2 icons, but like having the icon span two rows, where the title and subtitle are one row each)

just food for thought!

It would be nice if TW had something akin to that by default, like [[GettingStarted!!subtitle]]instead of having to do something like [[Hello|GettingStarted]] and potentially not having the same subtitle.

It could even be used for other fields as well, like caption or alias.

See the proposed PR: https://github.com/Jermolene/TiddlyWiki5/pull/6779