How to create a second series of tags

Hi everyone,

For my current project, I would like to be able to use additional fields ‘as tags’, i.e. having the following properties:

  • Added to the field by a similar process to tags
  • Displayed as tag pills
  • When you click on the tag pills, it shows a list of the tiddlers with that field

The reason I wanna do this is so that I can have ‘tags’ tracking keywords and authors of academic papers, and still use the original tag system for some of the behind-the-scenes code.

Any help with this would be much appreciated! I tried just copying some of the shadow tiddlers to do with tags, and replacing the word ‘tag’ with a given field, but that didn’t work…

Welcome to the forum, Holepunch!

I think there’s been more than one project that has done something like this. Here’s one:

https://ooktech.com/jed/ExampleWikis/GenericTagFields/

I found this by clicking on the “Links” link at the top of the forum, and typing in “tag” into the search engine, and then perusing the results.

My own approach is to use the existing set of tags, but with a modification to the tag selection bar so that I only see a particular subset of tags, depending on what I’m working on.

The filter-pill concept by @TW_Tones might also be helpful here. You can customize a tag-like interface where the drop-down collects tiddlers based on whatever filter-condition you like. It could be a single field-value, or something more complex (like tasks with this same place field-value, but only the ones not tagged done, or works by this same author, but only the ones published in the last 10 years, etc.).

You might want to combine this with a solution that offers a type-ahead drop-down to select from existing field values — a feature that I’d like to see widely available in all fields, whether or not they behave like tags.

Thanks both (and thanks for the welcome @Mark_S - I’ve been lurking for a while but finally decided to make an account)!

I tried the plugin you suggested, @Mark_S, but there seemed to be some kind of a bug - the custom tags were showing up in really big pills, and I couldn’t work out why. It even did it in another wiki of mine. Thanks for explaining the links page though - I’m sure that’ll come in very useful in future.

That solution works perfectly @Springer! I managed to do a couple of macrocalls (which eventually I’ll add to the view template) to create tag pills for everything in the authors and keywords fields, and because it’s based on filter expressions, it can even handle fields where I use “and” to separate entries (e.g. to make it work with RefNotes-style referencing macros, the authors list has to be separated by "and"s).

Good idea re the type-ahead drop-down. I think there’s an auto-complete plugin that I used years ago…

1 Like

There are a number of solitions for you @Holepunch with tiddlywiki and its easy to customise as well.

I will review and update the filter pill solution for more general use.

I also have previously researched alternative tags in tiddlywiki in some detail and see if I can find my notes.

Gentags is a good solution and deserves maintanence.