Thanks a Milion Mark S. , it's more clear now.
@Mat, Yes, after Mark's comment regarding "Style inside $list" and
"Anti-Condition" I think I can now play with "$:/core/ui/ViewTemplate"
P.S. , I'm using the "Standard Template Mechanism" ({{||MyTemplate}} to
achieve the same result (just sacrifice by the "text field")
On Tuesday, February 18, 2020 at 12:10:56 AM UTC+2, Mark S. wrote:
>
>
>
> 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/e5e1305b-349b-4412-9832-dbc4f8587943%40googlegroups.com.