div.tc-tagged-Ja .tc-tiddler-title { background-color: lightgreen; }
I would create a custom list and tag it to appear in the sidebar, ion that I would put the Color and logic there rather than in each caption. Perhaps have a caption Color field.
Tony
<div class="tc-table-of-contents">
<<toc-selective-expandable 'Pflanzen-Wiki' sort[title]>>
</div>
\define toc-caption()
<$list filter="[all[current]regexp:
tags[\bTag\b]]" variable="dum">@@color:Coulour;<$view field="caption"><$view field="title"/></$view>@@</$list>
<$list filter="[all[current]!regexp:tags[\bTag\b]]" variable="dum"><$view field="caption"><$view field="title"/></$view></$list>
\end
Following the principle that teaching a hungry man to catch fish is better than feeding him a single fish...
\define toc-caption()
<$list filter="[all[current]tag[wichtig]]" variable="dum">@@color:red;<$view field="caption"><$view field="title"/></$view>@@</$list>
<$list filter="[all[current]tag[RezeptGetested]]" variable="dum">@@color:green;<$view field="caption"><$view field="title"/></$view>@@</$list>
<$list filter="[all[current]tag[RezeptNICHTGetested]]" variable="dum">@@color:orange;<$view field="caption"><$view field="title"/></$view>@@</$list>
<$list filter="[all[current]!tag[wichtig]!tag[RezeptNICHTGetested]!tag[RezeptGetested]]" variable="dum"><$view field="caption"><$view field="title"/></$view></$list>
\end