On Wednesday, May 21, 2014 11:45:32 AM UTC-7, Will wrote:
>
> I have tiddlers all tagged as "log" with a standardized title structure:
> 2014-05-19 Mon
> 2014-05-20 Tues
> 2014-05-21 Wed
> (etc...)
> I'd like to group these into lists -- or even better, collapsible or 
> pop-out lists using something like MatchTagsPlugin -- for separate months 
> by filtering for "log" entries with a certain string in the title (2014-01* 
> for January, 2014-02* for February, etc...).  The standard list macro lets 
> me filter them by tag:
> <<list filter "[tag[log]][sort[-modified]]">>
> but I can't figure out how to *also* sort by title and/or date as I 
> described.
> Is there a way to use boolean logic and wildcards to achieve this type of 
> filter in TWC?  I've pored over a bunch of other similar posts on here, but 
> they all deal with TW5's ListWidget (<$list...>) and I haven't found any 
> that address this for TWC...
>

TWC filter syntax supports selecting tiddlers by matching field values, 
like this:
   [fieldname[value]]

However... this filter requires an exact match of the entire value, so it 
is not sufficient for your purposes.   Unfortuately, MatchTagsPlugin won't 
do the job either: although it allows use of boolean logic to select 
tiddlers based on combinations of tags, it does not handle filtering based 
on other field values, so comparison of tiddler title text is not supported.

One possible workaround strategy would be to add the month name as a tag 
value on each log tiddler.  Assuming you are using the TWCore 
<<newJournal>> macro to create your log tiddlers, you could use a "computed 
parameter" to automatically add the current month name, like this:
<<newJournal "YYYY-0MM-0DD" log {{new Date.formatString("MMM")}}>>

Then, with the month name tag on each log tiddler, you can use 
MatchTagsPlugin to select by both "log" and a specific month, and output a 
popup... like this:
<<matchTags popup "label:May" "prompt:view logs from May" sort:-modified log 
and May>>

To make this even easier, create a tiddler (e.g, [[ShowLogsByMonth]]) and 
replace the hard-coded month name with $1, as a *substitution marker* for 
use with tiddler transclusion via the <<tiddler>> macro: 
<<matchTags popup "label:$1" "prompt:view logs from $1" sort:-modified log 
and $1>>

To use this, you can simply write:
<<tiddler ShowLogsByMonth with: May>>

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://TiddlyTools.github.com/fundraising.html#MakeADonation

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to