This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

tag Macro

28th February 2024 at 1:13pm

The tag macro generates a tag pill for a specified tag. Clicking the tag pill opens a dropdown. This can be compared to the tag-pill Macro which also features other parameters.

Tip
If a list widget generates multiple tag macros for the same tag, clicking on one of them will open dropdowns on all of them. The simplest way to prevent this is to add the counter="transclusion" attribute to the list widget. See the examples below for more details.

Parameters

tag
The title of the tag, defaulting to the current tiddler

CSS classes

New in vv5.3.4
tc-tag-missing
This class is defined if a tag does not exist as a tiddler.
tc-tag-exists
This class is defined if a tag does exist as a tiddler

Defining the class

To define the tc-tag-missing class a stylesheet tiddler needs to be created. The default font-style for missing tiddler links is italic, so it's used for the example code below. Eg:

title: myTagsStylesheet
tag: $:/tags/Stylesheet

.tc-tag-missing {
	font-style: italic;
}

Examples