Toc sorted by creation

123 views
Skip to first unread message

K0ertis

unread,
Jan 9, 2016, 6:24:45 AM1/9/16
to TiddlyWiki
Hi! I am using TW5 and I struggle with the table of contents.
I want to create a toc which sorts all journals by its creating date and not its title.
The last created ones should be placed on top and I dont want to name journals by its date.


My Toc from last year:
2015
*December
** note 31dez
** note 1dez
*November
*October

and so on

so far i have this:
<div class="tc-table-of-contents">
<<toc-selective-expandable "2016" "sort[!created]">>
</div>

Thanks,

Tobias Beer

unread,
Jan 9, 2016, 3:38:22 PM1/9/16
to TiddlyWiki
Hi K0ertis,

Are you sure that the tiddler 2016
is the root tiddler of a tagging tree?

Best wishes,

Tobias. 

K0ertis

unread,
Jan 10, 2016, 4:44:49 AM1/10/16
to TiddlyWiki
Hi!
I have a tiddler which is named 2016 and tagged to Content, then the following Months are tagged to 2016. But I made a mistake previously, my toc looks like this:

<div class="tc-table-of-contents">
<<toc-selective-expandable "Content" "sort[!created]">>
</div>

All levels are sorted by created, or? So also the second level of the toc?

Thanks,
best wishes!

Tobias Beer

unread,
Jan 10, 2016, 5:16:52 AM1/10/16
to tiddl...@googlegroups.com
Hi K0ertis,
 
All levels are sorted by created, or? So also the second level of the toc?

That is right... and it is possibly the root of your problem.

I'm sorry to say — and I expected that to begin with —
but the kind of "date-drilldown" you wish to achieve
is really not what the toc is designed for.

In the end, why would you want or have all these month and years tiddlers?
It appears you possibly have no use for them, except maybe as:
  • 2016
    • 2016-01
      • 2016-01-10
    • 2016-02
Also, would a generic January need to have
each year as a tag where if there are tiddlers for it?

Anyhow, for a date-drilldown, we will need
a new, dedicated macro or rather widget, I presume.

Best wishes,

Tobias.

K0ertis

unread,
Jan 10, 2016, 7:28:01 AM1/10/16
to TiddlyWiki

Hi Tobias,
My idea is: I want to summaries my research of the day in the evening .For that it would be nice if the latest notes were on top of the list.

Till now I named the months 116 (caption January), 216(caption:February) etc. and for next year 117,217,317 etc.
Or do you know a better solution?

Thank you very much

Tobias Beer

unread,
Jan 10, 2016, 10:19:52 AM1/10/16
to tiddl...@googlegroups.com
Hi K0ertis,

There are a number of ways to go about it.

I think the simplest way to go about it would be to just use something like:

title: Latest

<$list filter="[!is[system]has[created]!sort[created]limit[50]]">
@@color:grey; <$view field="created" format="date" template="YYYY-0MM-0DD"/>@@
<$link><$view field="title"/></$link><br>
</$list>

Try it out on TiddlyWiki.com.

Best wishes,

Tobias.

K0ertis

unread,
Jan 12, 2016, 9:03:58 AM1/12/16
to TiddlyWiki
Yes that works for me! Thanks
Reply all
Reply to author
Forward
0 new messages