[tw5] Set Browser Tab title different from TW Title?

Is that possible? If so how?

For example, say the name of the TW is “The South-Eastern Canadian Women’s Association Left-Handed Doily Lint Museum for the Benefit of the Children”.

I want to keep that title on the wiki, but in the browser’s tab, I just want “Lint Mus.” - how do I do that?

This is a kludge, but might work well enough. My assumption is that to actually change the title tab would require changing core code. So instead, this approach uses CSS to change the title and sub-title displayed on the page, while retaining the configured title for the title tab.

Put your short title into the control panel title field. You will need at least one character in the sub-title field too.

Put the following a tiddler and tag $:/tags/Stylesheet .

.tc-site-title {
visibility: hidden;
position: relative;
margin-bottom: 60% ;
}
.tc-site-title:after {
visibility: visible;
position: absolute;
top: 0;
left: 0;
content: "The South-Eastern Canadian Women’s Association Left-Handed Doily Lint Museum " ;
}
.tc-site-subtitle {
visibility: hidden;
position: relative;
}
.tc-site-subtitle:after {
visibility: visible;
position: absolute;
top: 0;
left: 0;
content: “for the Benefit of the Children” ;
}

Change the “content:” attributes to your preferred titles. Change the margin-bottom: 60% to whatever percent works with your actual text.

This is what it looks like on my system:

1 Like

Thanks Mark! That worked!

To change the text of the window title (but not the SiteTitle or SiteSubtitle), edit the shadow tiddler: $:/core/wiki/title and set it’s content to whatever you want.

enjoy,
-e

2 Likes

OOH - that was even better! Thank you!