Table of contents: multiple tags?

129 views
Skip to first unread message

DemoniWaari

unread,
Aug 1, 2018, 7:29:44 AM8/1/18
to TiddlyWiki
Hi,

I have a table of contents where I keep my journal. The journal is further divided into months and weeks, so each month has multiple weeks under it. The problem is that if I have a week which has a few days in August for example (like week 31) and rest are in July, when I tag my daily tiddlers with "Week 31" I get the same tiddlers under July and under August, even though I'd like to just have 01.08 under August and rest of week 31 under July. So this is what happens:
  • July
    • Week 28
      • 10.07
      • 11.07
      • ...
    • Week 30
      • 24.07
      • 25.07
      • ...
    • Week 31
      • 30.07
      • 01.08
  • August
    • Week 31
      • 30.07
      • 01.08
I'd like it to look like:

  • July
    • ...
    • Week 31
      • 30.07
  • August
    • ...
    • Week 31
      • 01.08
So would it be possible to use tags like "Week 31", "August" and "Week 31", "July" to further specify where I want that one tiddler to reside in? I am generating the ToC simply with <<toc-selective-expandable 'Contents'>> (I didn't write the full structure above as it feels unnecessary).

Mark S.

unread,
Aug 1, 2018, 10:28:14 AM8/1/18
to TiddlyWiki
My uncreative approach would be to split week 31 into Week 31/A and Week 31/B. Otherwise I think you would have to rewrite the TOC to suppress the days when their month value (which you would need to add to each date) doesn't match the "grandparent" month.

-- Mark

TonyM

unread,
Aug 1, 2018, 7:56:07 PM8/1/18
to TiddlyWiki
DemoniWaari

What about listing all days in each month, after all there is never more than 31 of them and if a day is the first day of the week eg; monday show the week name next to that day, This acknowledges the weeks are not a subset of months. You could just show every monday and its week number but not other empty days.

Of note is your tag structure is in someways unnecessary if your journal tiddlers all contained a fields with the journal date/time because this is enough information to return any type of list and organisation by date.

Regards
Tony

DemoniWaari

unread,
Aug 2, 2018, 2:46:37 AM8/2/18
to tiddl...@googlegroups.com

@ Mark S.
Yeah I was thinking of that but it feels so clucky. Might be that I need to look at the TOC more in detail and see if I could do such a thing. Though I doubt it as I just started using tiddlywiki.

@ TonyM
Maybe I could try something like that. I just want to have tiddlers for weeks because I like to add there each friday what I've actually done that week. Perhaps I could have the week tiddler in between the days as a separator of sorts. That might actually work hmm.


EDIT:
That works great! Now I have a structure like:

  • July
    • 10.07
    • 11.07
    • Week 28
    • 12.07
    • ...
Unfortunately, now I can't get the main branch sorted the way I want it. I used to have a field "list" in my "Contents" tiddler where I have the order that I wish the ToC has. I added a field "sorting" under Journal with "created" in it so the Journal is sorted by creation date, hence the correct structure depicted above. But if I use a field named "sorting" for the Contents tiddler and just type out the structure I want, it doesn't do anything. I can, however, change it to "title" or "created" or whatever and it works fine. Unfortunately, it is not the order I want them in. Any ideas how to fix it? Now I am calling the ToC with: <<toc-selective-expandable 'Contents' "sort{!!sorting}">>

EDIT2:
HA! <<toc-selective-expandable 'Contents' "!sort[sorting]sort{!!sorting}">> works! EDIT: No it does not apparently, god dammit.

EDIT3:
Dammit now the ordering on my sidebar is different from what the tiddler shows (by title on sidebar and by manual list in tiddler itself). No idea why. Oh well its an improvement anyway.

EDIT4:
OK SO! <<toc-selective-expandable 'Contents' !sort{!!sorting}>> works if I also have a field "list" under my Contents with the correct manual order AND I type "list" in the "sorting" field. Though the sidebar still has the wrong order for whatever reason.


-DW
Reply all
Reply to author
Forward
0 new messages