On Monday, February 17, 2020 at 1:25:20 PM UTC-8, Mohamed Amin wrote: > > <div class=myclass01> > > 1. <$list filter="[all[current]tag[mytag]]"> > .... whatever you want to present, such as fields, > additional information, etc. > </$list> > </div> > > <div class=myclass02> > ... other sections for other tags, fields, etc. > </div> > 2. > > If you want to apply the class per "mytag", you need to put it *inside* the <$list ....> . And you need to specify the anti-condition in a separate list:
<$list filter="[all[current]tag[mytag]]"> <div class=myclass01> .... whatever you want to present, such as fields, additional information, etc. </div> </$list> <$list filter="[all[current]!tag[mytag]]"> <div class=myclass02> ... other sections for other tags, fields, etc. </div> </$list> However, this all applies to adding a *new* feature to the viewtemplate. If you want to change an *existing* portion of the view template, such as tags, then you need to do a little more hacking. But before I go any further, if al you want to change *are STYLES* based on a tag, then you might not need any of this. Each tiddler that has tags is wrapped in a div that has a data-tags attribute which lists the tags that apply to that tiddler. So you can use a stylesheet tiddler to change what the tiddler looks like based on its tags without having to make any code changes. Of course, the minute you want to do something like display fields, then you need to do something with the tiddler template. -- 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/9b50764b-651b-4b95-9a55-375276df3531%40googlegroups.com.

