I aim to create html-details for all tiddlers from the filter foo and link to each tiddler in the summary but omitt the suffix bar.
That doesn’t work if the tiddler uses a ViewTemplate.
The short version: I think I am lost in ticks and brackets once again and the last part of my procedure is to substitute the transclusion with a concatenation of a fields value with fixed text. someting like
Sidenote @kooma: while writing this I noticed, that the numbers of the footnotes from Refnotes are scrambled. I didn’t research yet weather this is to be expected.
Your backtick syntax looks correct, you just can’t use non-literal values with short-form transclusions. (The clue is in the proper name, substituted attribute values — i.e., this syntax only works when setting the value of an attribute in a widget or HTML element.) Try using the $transclude widget instead:
This should replace {{||$:/_/TiddlerTyp/book/ViewTemplate}} in your hard-coded working version.
Edit: Forgot to explain one crucial but non-intuitive detail: in the $transclude widget, $tiddler (modern syntax) or tiddler (legacy syntax) refers to the tiddler being used as the template, not the tiddler whose field content is being used — which is always <<currentTiddler>>. Thus, you could rewrite {{||$:/_/TiddlerTyp/book/ViewTemplate}} like this:
Your solution works for tiddlers with the TiddlerTyp=book.
But I have others like TiddlerType=person and most tiddlers use the standard ViewTemplate so they don’t need a TiddlerTyp at all ( eg. books in details )
I want to just call it like <<filterdetails>> in tiddlers of any TiddlerTyp, thus I want to pass it from a field. other wise I would just hard-code it.
“book” is not hardcoded anywhere, so I would expect my previous code to work with any tiddler with the TiddlerTyp field. You don’t seem to have any other TiddlerTyp values in your demo, though, so I can’t test it.
However…
Ah, I was assuming you were using the field more commonly than you are. In that case, I’d try this alternative:
This will construct an appropriate ViewTemplate title if and only if the TiddlerTyp is non-blank. Otherwise, it will use the tiddler as its own template, so it should appear as (the tiddler body) would if you opened it in the story river.