Creating a breadcrumb list of tags

281 views
Skip to first unread message

James Weaver

unread,
Dec 4, 2013, 3:23:02 PM12/4/13
to tiddl...@googlegroups.com
I'm using tags to represent a hierarchy, for example each of these are tags:

"games", "board-games", "chess"

In addition, "board-games" is tagged "games", and "chess" is tagged "board-games"

The LatvianGambit tiddler is tagged "chess"

As a result, I'd like the LatvianGambit tiddler to display the following near the top, with each segment of the breadcrumb being a link for navigability to the tiddler that represent the tag:

games -> board-games -> chess

This would seem to require recursion, and I'm not versed enough in the Way of TiddlyWiki5 to figure out how to accomplish that.  Any ideas?

Thanks,
Jim Weaver

 


Jonas Susara

unread,
Dec 4, 2013, 10:01:51 PM12/4/13
to tiddl...@googlegroups.com
Hello, James.

Maybe you'd like to try TagsTreePlugin? It can be found here: http://visualtw.ouvaton.org/VisualTW.html

It will show your tags in a tree-like structure on the left side.

Gah, I've been using it awhile. :)

--Jonas

Jim Weaver

unread,
Dec 4, 2013, 10:10:18 PM12/4/13
to tiddl...@googlegroups.com
Thanks Jonas.  Will it work with TW5?

Regards,
Jim Weaver

--
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/VTVnzy5I1LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Jonas "fudgebob dicepants" Susara

unread,
Dec 4, 2013, 10:39:17 PM12/4/13
to tiddl...@googlegroups.com
I am not sure about that coz I haven't tried it in TW5.

So... S.O.S to fellow TW fans here! :)

PMario

unread,
Dec 5, 2013, 6:27:27 AM12/5/13
to tiddl...@googlegroups.com
On Thursday, December 5, 2013 4:10:18 AM UTC+1, James Weaver wrote:
Thanks Jonas.  Will it work with TW5?
nope
-m

Joshua

unread,
Dec 5, 2013, 9:34:44 AM12/5/13
to tiddl...@googlegroups.com
I believe you will have problems due to the limitations in tagging. Tagging is like a link to another tiddler but that link carries not properties to describe why it is linked. You can definitely create a list filter which would give you the results you want, but only if LatvianGambit is only tagged by "chess" and "chess is only tagged by "board-games" and "board-games" is only tagged by "games." Actually, that isn't true. :-) There are other ways but they get pretty complicated. If you have a hierarchy you know ahead of time you could make a predefined list (see the "ListField" tiddler at five.tiddlywiki.com) of all board games, and a list of all games, and assuming "LatvianGambit" tags only one board game, "chess"; and chess tags only one type of game, "board-games"; you might still be able to create a list filter that will return the result you want, "chess" out of a list such as "chess", "checkers", "candy-land"... And in the same way build your list up the hierarchy. Maybe the "ListWidget" page of five.tiddlywiki.com will help. There are two nested list examples there.

I have been trying to use fields, instead of tags, to define relationships between tiddlers but I want the field name and field value to also be tiddlers and haven't figured out how to put all of that together yet. My goal would be to have RDF style N-triples.

Joshua

Evolena

unread,
Dec 5, 2013, 10:05:13 AM12/5/13
to tiddl...@googlegroups.com
As Joshua said, IF you have a strictly arborescent structure of tags (no tiddler with 2 or more tags), you may try to replace the content of the $:/core/ui/ViewTemplate/tags shadow tiddler by this:

<div class="tw-tags-wrapper"><$list filter="[is[current]tags[]]">
<$list filter="[is[current]tags[]]"><$list filter="[is[current]tags[]]"><$list filter="[is[current]tags[]]"><$transclude tiddler="$:/core/ui/TagTemplate"/> > </$list><$transclude tiddler="$:/core/ui/TagTemplate"/> > </$list><$transclude tiddler="$:/core/ui/TagTemplate"/> > </$list><$transclude tiddler="$:/core/ui/TagTemplate"/></$list></div>

This is designed for maximum 3 levels of tags + final tiddler, as for your LatvianGambit tiddler.

It's only a starting idea with my limited knowledge of the filters, it can certainly be improved.

PS. If you want a "tag map" tiddler, you may try :
! MyTagRoot1
<$list filter="[tag[MyTagRoot1]]">
* <$link to={{!!title}}><$view field="title"/></$link> <$list filter="[tag{!!title}]">
* <$link to={{!!title}}><$view field="title"/></$link> <$list filter="[tag{!!title}]">
* <$link to={{!!title}}><$view field="title"/></$link>
</$list>
</$list>
</$list>
! MyTagRoot2
<$list filter="[tag[MyTagRoot2]]">
* <$link to={{!!title}}><$view field="title"/></$link> <$list filter="[tag{!!title}]">
* <$link to={{!!title}}><$view field="title"/></$link> <$list filter="[tag{!!title}]">
* <$link to={{!!title}}><$view field="title"/></$link>
</$list>
</$list>
</$list>

James Weaver

unread,
Dec 5, 2013, 1:39:10 PM12/5/13
to tiddl...@googlegroups.com
Thanks, Evolena and Joshua.  I'll give that a try.

@Jeremy: Are there any features in TW5 (or in planning) that will support recursive navigation of parent (and child) tiddlers?

Thanks,
Jim

Jeremy Ruston

unread,
Dec 6, 2013, 2:36:40 AM12/6/13
to TiddlyWiki
@Jeremy: Are there any features in TW5 (or in planning) that will support recursive navigation of parent (and child) tiddlers?

I'm hoping that a fair amount of what's needed is already there. The key to displaying potentially recursive graphs is to use click-to-reveal to expand child nodes, rather than trying to expand the whole tree in one go.

All child tiddlers of the current tiddler (ie tiddlers tagged with the current tiddler):

[is[current]tagged[]

Parent tiddler of the current tiddler (ie tiddler title in the "parent" field):

[{!!parent}]

Best wishes

Jeremy
 

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Joshua

unread,
Dec 6, 2013, 6:21:56 PM12/6/13
to tiddl...@googlegroups.com, jeremy...@gmail.com
Great, I figured out how useful [{!!parent}] can be. Using your example above of [{!!parent}], am I correct in assuming there can be only one parent?

Joshua

Jeremy Ruston

unread,
Dec 7, 2013, 3:28:57 AM12/7/13
to Joshua, TiddlyWiki
On Fri, Dec 6, 2013 at 11:21 PM, Joshua <jlambert...@gmail.com> wrote:
Great, I figured out how useful [{!!parent}] can be. Using your example above of [{!!parent}], am I correct in assuming there can be only one parent?

Yes, that's right; we're using a field for the parent relationship because that gives us a one-to-one relationship. Using tags to model children gives us the required one-to-many relationship.

Best wishes

Jeremy

James Weaver

unread,
Dec 7, 2013, 11:20:42 AM12/7/13
to tiddl...@googlegroups.com, jeremy...@gmail.com
I'm not following the [{!!parent}] idea.  Are you saying that the parent field already exists and just has to be used in this manner, or a parent field has to be added?  I've tried both, but am too inexperienced with TW5 to have succeeded in making either work.  Can you please include a bit more instruction?

Thanks,
Jim

Joshua

unread,
Dec 9, 2013, 2:47:32 AM12/9/13
to tiddl...@googlegroups.com, jeremy...@gmail.com
I have a TW5 which includes a tiddler for "Class 01" and "Class 02". Class 01 has a field named "classdate" and one named "classnum." Each class has readings which are documented in tiddlers such as "Readings 01" and assignments with tiddlers such as "Assignments 01" or "Assignments 02". Tiddler "Readings 01" has field named "classnum" whose value is "01". Readings and assignment tiddlers always have the classnum field with a number to the appropriate class. I want to create a class schedule from a list rather than retyping everything so I created the following nested list.

<$list filter="[has[classdate]sort[title]]" >
<$list filter="[classnum{!!classnum}scheduleorder[2]]"><$transclude /></$list>
</$list>

The first line's list filter finds all tiddlers that have a field named "classdate" and lists them in alphabetical order. The second line's list filter finds all tiddlers that have the same "classnum" as the current tiddler. Specifically in this case, the first line returns "Class 01" as the first tiddler and the second line then determines what classnum that tiddler has and returns those tiddlers nested under "Class 01." The key part is [classnum{!!classnum}]. Tiddler "Class 01" has a classnum of 01 so [classnum[01]]. The following is the resultant list:

Class 01
- Readings 01
- Assignments 01
Class 02
- Readings 02
- Assignments 02

My class schedule list code looks like this in its entirety:

<$list filter="[has[classdate]sort[title]]" >
''<$view field="title" />''<br />Class Number: <$view field="classnum" /> -- Class Date: <$view field="classdate" /><ul><li>

Topic: <$list filter="[classnum{!!classnum}scheduleorder[1]]"><$transclude />
</$list></li><li>
Readings<$list filter="[classnum{!!classnum}scheduleorder[2]]">

<$transclude />
</$list></li><li>
Assignments Due<$list filter="[classnum{!!classnum}scheduleorder[3]]">

<$transclude />
</$list></li><li>
Thinking Ahead<$list filter="[classnum{!!classnum}scheduleorder[4]]">

<$transclude />
</$list></li></ul>

</$list>

Joshua

unread,
Dec 9, 2013, 2:49:47 AM12/9/13
to tiddl...@googlegroups.com, jeremy...@gmail.com
Sorry, I didn't say this, but my previous post was just an explanation for Jim.

Stephan Hradek

unread,
Dec 9, 2013, 3:41:40 AM12/9/13
to tiddl...@googlegroups.com
I'm not sure whether or not I understood it correct, but maybe this is what you want?

http://skeeve.tiddlyspot.com/#Example%20for%20James%20Weaver

Note: The "breadcrumbs"(?) are done manually in this example. So I have, in this case, 3 fixed tiddlers which I transclude automatically in each game tiddler.


James Weaver

unread,
Dec 9, 2013, 1:07:19 PM12/9/13
to tiddl...@googlegroups.com
Thanks Stephan.  Trying to digest your example now.

Regards,
Jim

James Weaver

unread,
Dec 9, 2013, 2:07:41 PM12/9/13
to tiddl...@googlegroups.com, jeremy...@gmail.com
Thanks for this very helpful example, Joshua!

Regards,
Jim

James Weaver

unread,
Dec 9, 2013, 2:23:24 PM12/9/13
to tiddl...@googlegroups.com
Very helpful, Stephan.  Thanks!

Regards,
Jim

On Monday, December 9, 2013 3:41:40 AM UTC-5, Stephan Hradek wrote:
Reply all
Reply to author
Forward
0 new messages