Hello friends,
I am creating a simple TW to note down the events of my personal life. Each
tiddler tagged as 'Event' has following fields:
event_what, event_when, event_why, event_who, event_how
These event tiddlers show as an html input form when in edit mode and
tabular form when in view mode(with help of TaggedTemplateTweakPlugin).
Now what I need is to create a timeline in which all event tiddlers are
listed after being grouped into years, then months and then date wise. So
my list should look like this:
!2011
!!1 (January)
*[[abc_event_in_jan]]
*[[xyz_event_in_jan]]
!!5 (May)
*[[jkjhkj_event]]
*[[vdfvdf]]
!2012
!!4 (April)
*[[some_event_in_April]]
*[[another-event-in-April]]
So in order to accomplish this I am trying to use inline script something
like this:
<script>
var years={};
var events= store.getTaggedTiddlers("Event");
for(var e=0;e<events.length;e++){
var y= events[e].fields.event_year;
var m=events[e].fields.event_month;
if(years[y]===undefined) years[y]={};
if(years[y][m]===undefined) years[y][m]=[]
years[y][m].push(events[e]);
}
</script>
So now I have an object which contains properties according to month
numbers which are associated with arrays which contain the event tiddlers.
Now what I want is to print out the years (asc/desc) and then months
(asc/desc) and then a list of event tiddlers in that month sorted on date.
I'd be grateful if you could provide a little idea how this can be done.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/tiddlywiki/-/2Qgt6W5MM5QJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.