Filter question using tags

Hi ,

I have a 4 tiddlers , tiddler1,tiddler2,tiddler3 and tiddler4

they are tagged a follows

tiddler1 has no tags
tiddler2 tagged with tag “tiddler1”
tiddler3 tagged with tag “tiddler2”
tiddler4 tagged with tag "tiddler3 "

i am doing it this way to establish some kind of a parent child relation

My question ,is there a way to filter them based on their tags ,so that i would get something t like this

Tiddler4 | Tiddler3 | Tiddler2 | Tiddler1
Tiddler 3 | Tiddler2 | Tiddler1
Tiddler 2 | Tiddler1

so basically display the hierarchy of the tiddlers from the bottom up based on their tags

For visually displaying trees of tags, there is the table-of-contents macros. For manipulating tiddlers related by tag, there is the 3rd party kin filter operator.

Tidgraph is nice.

https://ihm4u.github.io/tw5plugs/

HI, What you are asking for is what I may call breadcrumbs. The kin filter can do it but from memory you may need to name the root (top) tiddler.

I have written other code to do it. You need a recursive process to find the current tiddlers parent, and the parents parent etc… Until the tiddler has no parent. The only problem is if one of your tiddlers has another tag (two or more), it will think it has another parent.

Rather than use the new here to create “children” by tagging them with the current tiddler, you can use something like the TOCP plugin which saves the parent in the parent field, then you can have only one parent and you can get the parent from the parent field rather than the tags (which can have multiples).

Thanks everyone for the suggestions

@TW_Tones thank you for your response , how do you get the parent of the parent , i checked all plugins and they seem to achieve the result of displaying a hierarchy from the top down in a tree format, while what i need is the reverse , from the bottom up. which wont be a tree format, rather a table with every child and next to it all its parents

for using fields instead of tags ,i really think i am using something similar , so in the event of creating a new child tiddler , i know how to poplulate in the new tiddler a "child of " field that holds the title of the parent tiddler

i do this by using a button in the parent which does the following action

<$action-sendmessage $message="tm-new-tiddler" childof={{{ [{!!title}addprefix<lb>addsuffix<rb>] }}}/>

I put it into brackets to prevent other problems with space characters

I can also use a regular filter to fetch the “Child of” field value , but then , now i have the parent of the child , but what i want is also parent of the parent … and so forth

the other problem is, ideally i want it in Table format,is that possible ? because it will later be imported into excel … so i am not really after fancy diagrams ., but rather raw data that can snap into a table

Thanks again for your help

I will try and return with an answer tomorrow, if no ne helps however you need a recurve macro, one which calls itself if a child of/parent exists. Thus it will keep going until it finds a tiddler without child of/parent.

I edited your post to wrap the code so its readable.

There are better ways to deal with spaces.

And you can do a lot in tables and even csv, you can see but can copy to clipboard.