If, like @Springer (and @TW_Tones?) and me, you do a lot of work with cascades, you may have had the question I have semi-regularly: Which template tiddler is being used to render this one? (And how do I quickly access it to make changes?)
After going into the Control Panel one too many times just to work out the answer, it finally occurred to me that I could present this information on the tiddler itself. Here’s the template I came up with, ready for testing on TW-com or in your own wiki: Tiddler Cascade Info.tid (1.2 KB)
But if you’d prefer it somewhere more visible, you can replace the $:/tags/TiddlerInfo/Advanced tag — e.g., with $:/tags/ViewTemplate to make it a default ViewTemplate section — or incorporate it elsewhere (as in @TW_Tones’ tiddler card system?)
Please feel free to use this however you like, and let me know if you think of any clever enhancements!
I had been manually adding a field called in-cascade to anything template-like, because I wanted to make sure I could easily reconstruct these relations, since backlinks don’t easily read inside filters. (Maybe this is the opposite of your direction of concern, but related!)
I also started including a tiny template-link icon tucked into most of my templates. During the tinkering phase of a project they’re so handy! (EDIT: But only if the template is actually showing!)
[I’ll take a closer look at your approach! …]
FOLLOW-UP: I love that tucking all this into the info panel makes it available no matter what other weirdness has been happening with my view templates. So often, when a template isn’t showing, it takes a while to navigate to the right cascade-tag for checking / reordering. The fact that this table is packed with these links makes troubleshooting is much more friendly.
That’s serendipitous! I’m not sure what modifications would be needed for the core (<<lingo>> macros at minimum, I imagine?), and even less sure I have time to relearn how to use GitHub right now. But I left a comment in hopes that it might be a good jumping-off point, at least. Thank you for bringing it to my attention!
Somehow at least one cascade condition isn’t connecting properly… I’m set up to display a tag-pill in titlebar if the tiddler functions as a tag. The “in use” heading captures the tag template properly, but the source filter is missing the active filter, and instead yielding the cascade-condition that’s one further down the chain (in this case, the filter that prefers the caption if there is one)…
(that is, replacing subfilter with filter) yields the correct results. If you can confirm all looks good on your end, I’ll update my OP as well. Now updated in the .tid file and the codeblock, both in my OP here and in my GH comment. Thank you for catching that!
It results in a (lady) bug floating to the left of each view template item iterated, and mouse over shows what tiddler the content is generated from, and click to open.
Later if a get a nice local delist of an element, that is indicate I dont want this particular item display on this tiddler only, I may allow that with a control click.
First I will test this inside the card mechanism
This is done with very few bytes but does need to edit a core tiddler, so in some ways it would make sense to incorporate in the core, and toggled on/off.
Or installed by plugin that is disabled when not in use (thus restores the core)
Actually, I’d initially wondered about including a list of relevant $:/tags/ViewTemplate segments in the tiddler info, alongside the cascade information. As you can see, I ultimately abandoned that idea; since segments are often wrapped in conditionals to control their display, I couldn’t figure out an easy way to construct such a list without first wikifying each segment. But rendering the link inline with the segment itself is very clever! I do think it would merit its own stand-alone plugin for designers, if not a core setting that could be toggled.
Thanks for sharing your preview here! I’m sure it will be of interest to a similar group of tinkerers.
That’s the problem for which I created a little “phone home” icon within most of the custom view-templates I’ve designed (especially for virtual tiddlers, as they are all rendering conditionally, and stacked vertically in complex ways).
It’s not hard to make such a “take me to the template” icon relatively inconspicuous — and for a wiki with author and reader roles, to make it display only in author/editor mode.
For example, the “linkstyle” tiddler has a field-description at top, and other field-related overview stuff at bottom, but it’s also a tag, and also has a text field. There’s a icon that functions, in any of those places, to get me to the template. (The ladybug icon used by @TW_Tones would be cuter and more visually salient, of course!)
I have long included in my own content a link to the template when $:/config/design-mode=yes however the one I discussed above gives me a link to “any template” item, from the core, plugins or some fancy play I did. However in this case these lady bugs are toggled off with $:/config/debug-mode=off/hide or something. And the are off almost always, except in design or research mode.