I think you're right that there's no way to avoid repeating the
div.tc-tiddler-body, but you can still simplify this down to:
[data-tags*="Tasks"] div.tc-tiddler-body,
[data-tags*="Projects"] div.tc-tiddler-body,
[data-tags*="Initiatives"] div.tc-tiddler-body,
[data-tags*="Meetings"] div.tc-tiddler-body,
[data-tags*="Debriefs"] div.tc-tiddler-body {
display:none;
}
Then at least you don't have to have the same formatting rule 5 times.
On Friday, April 30, 2021 at 6:12:37 AM UTC-5 Stobot wrote:
> Thanks Soren - that got me what I needed. I do worry a slight bit about
> the performance myself, as it does seem like I'll be double-rendering, but
> at least it solves it without modifying the core. I'll have to think about
> the lesser of evils.
>
> Note in case anyone else follows this, I got stuck temporarily as I
> followed Odin's path too literally - cloning the original core
> $:/core/ui/ViewTemplate/body which included the tc-tiddler-body class too.
> When I stripped that out, it worked fine.
>
> I'd not used data-tag styling before, so that's good learning for me.
> Because I needed to apply to multiple tags and only one particular chunk, I
> ended up having to do separate lines (like below) whereas the instructions
> indicate it may be possible to do all as one with
> [data-tags*="Tasks"],[data-tags*="Projects],... but the div.tc-tiddler-body
> thing I couldn't work in.
>
> [data-tags*="Tasks"] div.tc-tiddler-body {display:none;}
> [data-tags*="Projects"] div.tc-tiddler-body {display:none;}
> [data-tags*="Initiatives"] div.tc-tiddler-body {display:none;}
> [data-tags*="Meetings"] div.tc-tiddler-body {display:none;}
> [data-tags*="Debriefs"] div.tc-tiddler-body {display:none;}
>
>
> On Thursday, April 29, 2021 at 9:57:37 PM UTC-4 Soren Bjornstad wrote:
>
>> On Thursday, April 29, 2021 at 8:51:57 PM UTC-5 Soren Bjornstad wrote:
>>
>>> I wanted tiddlers with a particular tag to not use the default template
>>> at all.
>>
>>
>> Correction: By this I mean "not to show the text field at all." The only
>> thing this approach hides is the content defined
>> in $:/core/ui/ViewTemplate/body -- the other components of the default view
>> template are still included.
>>
>>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/b905bb2c-0a3a-495b-a6bb-cf6024305570n%40googlegroups.com.