List tiddlers by tag in sidebar?

246 views
Skip to first unread message

Evade Flow

unread,
Dec 28, 2016, 6:07:51 PM12/28/16
to TiddlyWiki
At any given time, I have open questions—on a variety of different topics—that I'm actively seeking answers to. I'm considering using TW to manage this information. This video gave me the idea that I could tag open questions with 'question', and then tag them with 'answer' once I'd found an acceptable answer, using the presence/absence of the 'answer' tag as way of determining which 'bucket' to sort the tiddler into. That same video series (I think) explains how to use '<<toc-selective-expandable>>' to create a 'Contents' tab in the sidebar. Awesome!

What I can't figure out is: how can I get TW to display a list of questions in the sidebar, sorted by tag? I want a 'Contents' page in the sidebar that lets me drill down into questions (and/or answers) by tag, as implied by this bit of ASCII art:

Questions                                                                              

|

├── embedded

  └── Can't embed QWidget in QML?

|

├── jenkins

│   └── Pre-tested commits in Jenkins?

|

└── qt
    ├── Can't embed QWidget in QML?

    └── Passing parent arg to Qt ctors?


(NOTE: The list under each tag should itself be expandable.)

I've been furiously pasting various snippets of I-don't-know-what found on the Interwebs into my 'Contents' tiddler, hoping that something would 'click' for me, but the sources I'm pasting from assume a great deal of familiarity with the ecosystem. Since I just started looking into TiddlyWiki, I don't really understand the things I'm pasting, and it doesn't feel like I'm getting any closer to a solution.

Can anybody explain—in terms a newcomer can understand—how to accomplish this?

Mark S.

unread,
Dec 28, 2016, 6:40:31 PM12/28/16
to TiddlyWiki
Isn't that what the TOC macros already do for you? Let you create a multi-step table of contents?

So a tiddler called "embedded" that is tagged with "Question" will appear under a top tiddler called Question. Likewise, a tiddler with a question "Can't embed QWidget in QML?" and tagged with "embedded" will appear beneath tiddler "embedded".

How do you have your tiddlers tagged, and in what way do you consider their display to be incorrect?

BTW, there are at least 4 other types of TOC macros to choose from, in case you want a different presentation style. Just search for "Example Table of" at tiddlywiki.com


Good luck!
Mark

Tobias Beer

unread,
Dec 29, 2016, 1:17:54 AM12/29/16
to TiddlyWiki
Hi there,

xlist should help you with that:


Best wishes,

Tobias.

Evade Flow

unread,
Jan 1, 2017, 5:46:10 PM1/1/17
to tiddl...@googlegroups.com
Isn't that what the TOC macros already do for you? 

Sort of. But they seem to want me to commit to a single 'container tag'. It's a bit hard to explain, but imagine tiddlers with <title>: <tags> as follows:

answer: Contents
question: Contents
annoyances: answer, question
osx: answer, question
Stop OS X from spamming thumb drives?: annoyances, answer, osx, question

If I put this in the 'Contents' page:

<div class="tc-table-of-contents">
    <<toc-selective-expandable 'Contents' sort[title]>>
</div>

the result is (sorta) close to what I want, but there are a few issues:
  1. The last tiddler shows up in the TOC tree four times.
  2. I had to manually create a 'dummy' tiddler for each topic, and tag it with 'answer' and 'question', which doesn't seem very scalable.
I'm sure this is expected behavior, it's just not ideal for what I had in mind. What I'd really like is for questions tagged with 'answer' to only show up under the 'answer' branch of the TOC. They can occur there multiple times—once per 'topic tag'—but they shouldn't be listed anywhere under 'question' if they're also tagged with 'answer', and shouldn't be duplicated in the rendering of the 'question' and 'answer' tiddlers themselves. And I'd rather not have to manually maintain a taxonomy of topics/tags.

Admittedly, this may be an XY problem. Perhaps there are better ways to manage this information than to create a 'stateful' table of contents. I just tend to start each day asking, "Okay, what questions am I trying to get answered today?" I'm open to suggestions about other ways TW can help with this.

In the meantime, Tobias' xlist plugin looks like it might help, so I'll give it a try. Thanks!


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/9Cr9AKYGgVA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/42621360-b0cf-4ce8-9249-a95af1fb14a7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Tobias Beer

unread,
Jan 2, 2017, 3:55:03 PM1/2/17
to tiddl...@googlegroups.com
Hi again,

I think your problem possibly stems from overloading individual tiddlers with tags.

In other words, you would not have your problem if only questions were tagged Question and only answers were tagged Answer and then you could relate one with the other either through tagging or simply using another (list-like) field.

For the latter, i.e. for using a custom related list, I created a little demo (because tagging should not be overloaded, i.e. they should not be the catch-all for every type of relation, since they are semantically ambivalent):


Best wishes,

Tobias. 

Tobias Beer

unread,
Jan 3, 2017, 2:02:22 AM1/3/17
to tiddl...@googlegroups.com
One more detail:

I would recommend you read this article I wrote:

http://tobibeer.github.io/tb5/#Tags-101

In combination with my example above, you should get a clear idea of when / how to use tags and especially when / how perhaps not to.

My example above, simply demonstrates a way for you to define your very own tag-like semantics on top of generic tags. This is the most powerful tool for you to separate concerns and not overload that one ToC to catch them all... which will never work well, unless, perhaps... you find a way to not have multiple inheritance, i.e. a child being a child to more than one parents in your tagging hierarchy. This also puts a strong veto on any recursive tagging, i.e. where a category would have the same tags as its children.

One thing I often do is to also separate tiddlers regarding concepts from individual items, e.g.

Question: could be a tag given to tiddlers being Questions, the tiddler itself showing but a list of all Questions or a way to drill down by category
Questions: is a tiddler explaining the concept of "Questions" whereas tiddlers tagged Questions explain conceptually more fine grained details about Questions, e.g. FAQ or "Who can submit Questions?"

Best wishes,

Tobias. 

Evade Flow

unread,
Jan 3, 2017, 3:47:52 PM1/3/17
to tiddl...@googlegroups.com
Wow. That's a lot to digest, thank you! I'll report back when I've had a chance to process it all. (I suspect I'll need to get a better understanding of the TW ecosystem, in general, before it 'clicks' for me...)

On Tue, Jan 3, 2017 at 2:02 AM, Tobias Beer <beert...@gmail.com> wrote:
One more detail:

I would recommend you read this article I wrote:

http://tobibeer.github.io/tb5/#Tags-101

In combination with my example above, you should get a clear idea of when / how to use tags and especially when / how perhaps not to.

Best wishes,

Tobias. 

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/9Cr9AKYGgVA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
Reply all
Reply to author
Forward
0 new messages