\define dateincrements(datefield,inc:"d w f m h q y") dateincrements "$inc$" <$list filter="$inc$" variable=period> Each:<<period>><br> <$list filter="THISFILTER" variable=day> Action <<day>><br> </$list> </$list> \end
I want a filter "THISFILTER", such that, for example
Action <<day>><br>
will only occur when <<period>> is = "d".
Thanks in Advance
Tony
\define dateincrements(datefield,inc:"d w f m h q y") dateincrements "$inc$" <$list filter="$inc$" variable=period> Each:<<period>><br> <$list filter="[<period>prefix[d]]" variable=day> Action <<day>><br> </$list> </$list> \end
There are some pull requests with competing implementations of filter operators that would solve this. I believe that the most mature plugin for this is by Tobias http://tobibeer.github.io/tw5-plugins/#contains. I made some filters that do similar things here (the plugin tiddler is here). If I remember correctly Tobias made (or is making) a plugin to do just equality but I am not sure what the link to that one is.
Thanks, I will test it soon. The old prefix operator comming to the rescue once again when we want to compare a title to a literal in this case d.
Ta muchly
Tony