I was going to say I’ve never had this problem… and then I remembered that I’d altered my cascade to avoid it. Here are the simplest-possible changes I’d recommend:
-
Edit
$:/config/ViewTemplateBodyFilters/default
to the following:
[has[title]then[$:/core/ui/ViewTemplate/body/default]]
This preserves the default view template for extant tiddlers.
-
Create a new cascade tiddler,
$:/config/ViewTemplateBodyFilters/missing
(or your preferred title). This will become our new final fallback for missing tiddlers.
title: $:/config/ViewTemplateBodyFilters/missing
tags: $:/tags/ViewTemplateBodyFilter
text: [is[missing]then[$:/core/ui/ViewTemplate/body/default]]
list-after:
list-after
ensures this will always be the last item in the cascade, and again, it applies $:/core/ui/ViewTemplate/body/default
. Assuming you haven’t edited that default template, it contains
<$transclude>
<$transclude tiddler="$:/language/MissingTiddler/Hint"/>
</$transclude>
And there’s nothing to transclude in a missing tiddler, of course, so you’ll always be transcluding $:/language/MissingTiddler/Hint
. (Conversely, our earlier invocation of $:/core/ui/ViewTemplate/body/default
never transcludes the hint, because the tiddler always exists.)
- Between
$:/config/ViewTemplateBodyFilters/default
and$:/config/ViewTemplateBodyFilters/missing
, add as many cascade tiddlers (each defining their own ViewTemplates) as you like. You will only see the default missing-tiddler hint if none of the intervening cascade filters apply.
For instance, I have a “missing-only” cascade filter that looks like this:
[<currentTiddler>minlength[3]listed[author]limit[1]then[AuthorTemplate]]
This applies a programmatically generated “author” template to any missing tiddlers that appear in at least one author
field. The minlength[3]
isn’t strictly necessary; I added it so I could avoid the presumably more costly listed
step when a title is undoubtedly too short to qualify.
That’s the basic overview. Please feel free to adapt this if it’s useful to you.