How to hide tags

804 views
Skip to first unread message

Steve S

unread,
Oct 13, 2019, 11:46:04 PM10/13/19
to TiddlyWiki
Hi,

I would like a simple clean list of my tiddlers. I have managed to remove the author and heading and subtitle fields according to this tiddler: "How to hide the author's and other fields with CSS" but this doesn’t say how to remove the tags. I know its possible because I saw it here http://t5a.tiddlyspot.com/ but I haven't managed to work out how he did it. 

I will email the author of that page and put my findings here if I find it. This is a learning process for me and also perhaps others have the same question so I thought it worth putting the question here also. 

I don't really understand what CSS is so I need fairly simple instructions. 

Because it is sometimes good to see the titles and tags it would be nice to have a button to turn them on and off easily, but I guess that calls for another topic?

Thanks for any help. I did have a search but didn't find anything that seemed to do this.

Mark S.

unread,
Oct 14, 2019, 12:28:24 AM10/14/19
to TiddlyWiki
CSS is the magic instructions that web browsers use to display your bland, run-of-the-mill text in various exciting ways.

CSS isn't my forte, but the following should work on recent versions of TW until someone with better advice comes along.

Make a tiddler and tag it $:/tags/Stylesheet . Put this content in it:

.tc-tags-wrapper {
display
: none;
}

Close and save the tiddler. Your tags should disappear.

TonyM

unread,
Oct 14, 2019, 12:39:19 AM10/14/19
to TiddlyWiki
Steve,

The Non CSS way.

Do you want to hide the tags on all tiddlers always or some tiddlers some times? Are you happy to leave them visible in edit mode so at least while editing they are there, or would you like to hide some tags only?

To get you rolling see the $:/tags/ViewTemplate tags
You can create a Tag pill with 
<<tag $:/tags/ViewTemplate>>

If you click on this you can see $:/core/ui/ViewTemplate/tags

If you click on this you can open it. If you remove the $:/tags/ViewTemplate tag you will not longer see them in the view template.

Or you could edit $:/core/ui/ViewTemplate/tags and wrap it in a conditional display

<$list filter="[all[current]is[system]]" variable=nul>
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
<div class="tc-tags-wrapper"><$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/></div>
</$reveal>
</$list>

Like my list widget above which only displays tags on system tiddlers, but you could refine this to a filter like
[all[current]!hide-tags[yes]] and it will only display if the current tiddler does not have a field hide-tags = yes

This is editing a shadow tiddler so check for changes after an upgrade of tiddly wiki

Regards
Tony

Steve S

unread,
Oct 14, 2019, 1:48:06 AM10/14/19
to TiddlyWiki
Thanks Mark, 

It worked... but not initially.  it seems fussy about what goes in the file, whether it can go in separate files and at least what comes before. It probably didn't help that the example in "how to hide" had a typo in that there was a ')' instead of a '}' like this "h2.tc-title {display:none;)"

In the end I did this
tc-subtitle {display:none;} h2.tc-title {display:none;} .tc-tags-wrapper {display: none;} with some explanatory text after

and it worked, but a few permutations sometimes showed dates and titles etc. One thing I did work out is that if you put (explanatory) text at the start of the toddler then it doesn’t like it but after was ok. Sorry if my formatting is a bit hard to understand, I'm still working out how to quote code. 

Eventually I would like a clean evernote experience where you can easily choose which fields to display and not and if you just write in the text field then the first line becomes the title. 

I also find it a bit annoying to not be able to simply type or tab down from the title to where I want my text. (Basically I'm talking about fast entry of one or two lines of text per toddler,) That's another topic so I'll have a go at another time. I'm very thankful that I have made this progress today. 

I will also have a look at TonyM's solution below but the first read looks complicated and I don't know what a "pill" is. It's a good learning experience!

Sylvain Naudin

unread,
Feb 27, 2020, 8:08:06 AM2/27/20
to TiddlyWiki
Hi,

I'm interested if someone know to hide only one specific tag, a normal tag, or a systeme tag like $:/mytag and display others tags.

I've search groups but don't find the right tips. I hope it's possible..

Thanks !
Sylvain

TonyM

unread,
Feb 28, 2020, 6:30:39 PM2/28/20
to TiddlyWiki
I think this would be a feature request.

However if you used mario's alternative tags plugin you could use another field for tagging, and choose not to display that on the view template.

Regards
Tony

Eric Shulman

unread,
Feb 28, 2020, 7:03:23 PM2/28/20
to TiddlyWiki
On Thursday, February 27, 2020 at 5:08:06 AM UTC-8, Sylvain Naudin wrote:
I'm interested if someone know to hide only one specific tag, a normal tag, or a systeme tag like $:/mytag and display others tags.

Here's a customization that does what you want:

1) edit $:/core/ui/ViewTemplate/tags
2) in the <$list> widget, change this:
<$list filter="[all[current]tags[]sort[title]]".../>
with this:
<$list filter="[all[current]tags[]sort[title]] -[enlist{$:/config/HideTags}]".../>
3) create a new tiddler named $:/config/HideTags
4) in the text field of that tiddler, enter a space-separated list of tag names that you want to hide

Q.E.D.

Let me know how it goes...

enjoy,
-e

Mohammad

unread,
Feb 29, 2020, 1:19:50 AM2/29/20
to TiddlyWiki
Added to TW-Scripts (will be available in March 2019 update)

TonyM

unread,
Feb 29, 2020, 7:50:23 PM2/29/20
to TiddlyWiki
Eric,

Perhaps we can provide instructions in TiddlyWiki Markup?

Yours for example, paste this into a tiddler.
#edit $:/core/ui/ViewTemplate/tags
#in the `<$list>` widget, change this:

```
<$list filter="[all[current]tags[]sort[title]]".../>
with this:
<$list filter="[all[current]tags[]sort[title]] -[enlist{$:/config/HideTags}]".../>
```


# create a new tiddler named $:/config/HideTags
# in the text field of that tiddler, enter a space-separated list of tag names that you want to hide
[[Discussion|https://groups.google.com/d/msg/tiddlywiki/Rjx1qERJ0VI/YIlf46mXAAAJ]]

Sylvain Naudin

unread,
Mar 1, 2020, 4:54:06 AM3/1/20
to TiddlyWiki
Hello Eric,

Wonderful !! Many thanks for this quick tips ! It perfectly do the job :)

Again, thanks !
Sylvain
Reply all
Reply to author
Forward
0 new messages