I'm thinking that the way to go about it, if it doesn't pose too much of a
compromise, is to make a tiddler for each year/month with a field like
"yearmo".
Then list all the year/months and use them to filter in a sub-list with a
regular expression and a couple of massaging macros, like:
*\define findme2() ^$(findme)$*
*<div class="tc-timeline">*
* <$list filter="[has[yearmo]sort[yearmo]]">*
* <div class="tc-menu-list-item">*
* <$view field="title" />*
*<$set name="findme" value={{!!yearmo}} >*
*<<findme2>>*
* <$list filter="[regexp:created<findme2>!sort[created]]">*
* <div class="tc-menu-list-subitem">*
* <$link to={{!!title}}>*
* <<timeline-title>>*
* </$link>*
* </div>*
* </$list>*
*</$set>*
* </div>*
* </$list>*
*</div>*
The compromise is that you have to remember to add a year/month label for
each active month. But you shouldn't have to modify your code.
-- Mark --
On Wednesday, August 26, 2015 at 5:24:48 PM UTC-7, Nicholay Nascimento
wrote:
>
> I'm trying to implement a sidebar tiddler for my journal entries that
> lists tiddlers tagged "journal" by year and month created, like in this
> image <http://s12.postimg.org/hn9dt9eq5/blog_archive.png>. I want the
> list to generate automatically, i.e. I don't have to "hard code" specific
> years and months into filters using things like [regexp:created[^201508]].
> I fiddled with the timeline macro trying to get it to group by month, below
> is what I have so far. The problem is the inner list filters by full date
> and I think it could work if I could just extract the portion of the
> "created" field that I need (6 digits for month, 4 for associated year in
> another list). Admittedly I don't understand too well about how widgets
> work but after a lot of searching it seems like the problem is that
> Tiddlywiki itself doesn't have such a mechanism to do what I want. Is there
> any built-in way to do this in Tiddlywiki? If not, is there a way to get
> the effect I'm after in general? I definitely don't want to go with a
> calendar view solution. Sorry if I'm not clear enough. Any help on this
> would be appreciated, thanks.
>
> <div class="tc-timeline">
> <$list
> filter="[tag[Journal]!is[system]has[created]!sort[created]each[created]]">
> <div class="tc-menu-list-item">
> <$view field="created" format="date" template="MMM"/>
> <$list filter="[created{!!created}!is[system]!sort[created]]">
> <div class="tc-menu-list-subitem">
> <$link to={{!!title}}>
> <<timeline-title>>
> </$link>
> </div>
> </$list>
> </div>
> </$list>
> </div>
>
>
>
--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/d3768fbe-cd5d-4a40-b9cd-80735ea263f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.