Tag format: restricted tag list on left, meta tag on right, in same line

46 views
Skip to first unread message

Aidan Grey

unread,
Jul 20, 2019, 10:39:09 PM7/20/19
to TiddlyWiki
Hello all,

With various people's help (especially Mark S's), I have accomplished my goals, and I thought I should share it all for all the others who wanted to do something similar:


GOALS:
1. Filter out some tags, so they don't show up in any tiddler's tag wrapper.
2. Define some meta tags in a similar way
3. have the meta tags appear on the right (as opposed to the left for most tags, in Vanilla theme)

Here's how I did it:

1. Create a tiddler called ignore. Its contents are solely the tags I don't want to see, as a list with spaces. e.g. :  work [[The Thing]] time orphan ignore fix
2. Create another tiddler called meta, with the tags you want to see in the "meta zone". E.g. work fix
3. In $:/core/ui/ViewTemplate/tags, edit the code as below.
4. I wanted the meta tags to be a different color too - easiest way was to just change the color of each meta tag in the Tag Manager.

Hope this is helpful to someone else!

<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes" >

	<div class="tc-tags-wrapper">

		<span style="float:left;">
			<$list filter="[all[current]tags[]!subfilter{ignore}sort[title]] " template="$:/core/ui/TagTemplate" storyview="pop"/>
		</span>

		<span style="display:inline-block;float:right;">
			<$list filter="[all[current]tags[]subfilter{meta}sort[title]] " template="$:/core/ui/TagTemplate" storyview="pop"/>
		</span>

	</div>

</$reveal>

Mohammad

unread,
Jul 20, 2019, 11:00:09 PM7/20/19
to TiddlyWiki
Thanks Aidan for sharing this!
My question is do you intentionally show the meta tags on all tiddler even they have not that tags?

--Mohammad

Aidan Grey

unread,
Jul 20, 2019, 11:18:29 PM7/20/19
to tiddl...@googlegroups.com
LOL no. I didn't notice it was adding them to all tiddlers until after I posted, and I was hoping to sort it out before anyone noticed. 

As it turns out - I can't figure out what I've done wrong that it's adding them to every tiddler.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/252a6ba7-a403-49ad-8f1e-39871780ed87%40googlegroups.com.

Aidan Grey

unread,
Jul 21, 2019, 1:40:10 PM7/21/19
to tiddl...@googlegroups.com
I have fiddled for hours, investigated parent container classes, tried 475 variations of the filter, and so on. No matter what I do, that subfilter breaks. 

As best I can tell, it's the subfilter that forces the tag to appear everywhere. If I leave it out, or leave in the !, it works fine. But, of course, I need to specify which tags to include in the second part, not what to exclude.

I've tried the usual specs too (such as  [all[current][tags[]tag[work]] [all[current][tags[]tag[test]+[sort[title]])

I've investigated the structure of the reveals and the various classes that define the tiddler. Can't get it to work.

So, ignore the last part, and just use these:

Ignore: a tiddler called ignore, with all the tags you want to ignore / prevent from showing up in the tag list. If you use the orphan tag method below, that's the first obvious tag to ignore.

  • filter is [all[current]tags[]!subfilter{!!ignore}sort[title]] in $:/core/ui/ViewTemplate/tags
  • It can still be manipulated in the Tag Manager in Tools
  • original is [[$:/core/ui/ViewTemplate/tags]]

Orphans: tag anything you don't want to see in the orphan list with orphan, then add the filter. Keeps the always-ophans from cluttering the list of actual orphans

  • filter is [all[orphans]!tag[orphan]sort[title]] in filter field of $:/core/Filters/Orphans
  • original is [all[orphans]sort[title]]

Also, to prevent tids from showing as orphans (cause they willalways be, like for ToC), tag them with orphan, and then 

Reply all
Reply to author
Forward
0 new messages