Tabs macro viewtemplate question

Yes the truly cascade-based solution is the one that I initially assumed you’d want, back toward the beginning of this thread…

But now you will need to change the body tab element back to a basic transclusion of the text field (not itself appeal to the cascade condition — otherwise, you get some kind of regress of a body inside a body inside a body).

So, you want instead to have the template (the whole set of tabs) display only as the body area (some or all) non-system tiddlers. All good; that avoids the risk of bricking your import dialog and other essential parts of the wiki.

However, you then also need to REMOVE that stylesheet that makes the body field disappear, as quoted in your first post:

title: stylesheet
tags: $:/tags/Stylesheet
body: """ 
.tc-tiddler-body {display: none;} 
"""
2 Likes

@etardiff
Ah, thank you- I had used that tag before but thought I was doing something wrong when it began to mirror my tabs, but that was due to the cascade situation Springer pointed out after your response.

@Springer
Initially yes it was, however the idea of being able to selectively apply the tabbed layout meant that I could use it for other ideas later down the line.

I’ve reverted the cascade design back to the transclusion, but I can’t figure out what I can do to replace the functionality of the fields to tabs, which I’m pretty sure relied on the cascade to turn into a tab that shows it’s text :confused:

I just tweaked my demo for tabbyView, so that the template only applies (via the central TW cascade mechanism) to tiddlers that meet a certain condition, and the body tab within the template is a simple default transclusion.

You can drag the tag into your own project, and all the elements will come over. Even the cascade condition should come over fine, because I gave it a list-after field with the value
$:/config/ViewTemplateBodyFilters/code-body

Currently, the tabbyView template is set to apply ONLY to the set of tiddlers tagged tabbyView (so that the template doesn’t affect other demos on the same site). You can change the filter condition so that it applies to all non-system tiddlers, or whatever other condition you like.

2 Likes

I appreciate the updated version, after taking a look at how you did it, I figured out what was wrong with my own approach, thank you for the help :grinning_face_with_smiling_eyes:

1 Like