As you know {{||$:/core/ui/TagTemplate}} displays a Tag Pill for the current tiddler.
Does anyone know a way to retain all the functionality of a tag pill, ie colour, dropdown list of tagged tiddlers (open all tiddlers provided by plugin)
However allowing me to provide a different name eg "Tagging" rather than the current tiddlers name?
<$view tiddler="""$tag$""" field="title" format="text"/><$view tiddler="""$tag$""" field="tagtitle" format="text"><$view tiddler="""$tag$""" field="title" format="text"/></$view> \define tag-pill-styles()background-color:$(backgroundColor)$;fill:$(foregroundColor)$;color:$(foregroundColor)$;\end
\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$"""><$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible" style=<<tag-pill-styles>>>$actions$<$transclude tiddler="""$icon$"""/> <$list filter='[{$:/core/macros/tag!!someemptyfield2}!prefix<LABEL>]' emptyMessage='<$view tiddler="""$tag$""" field="title" format="text" />' variable='dummy'><<LABEL>></$list></$element-tag$></$vars>\end
\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)<$macrocall $name="tag-pill-inner" tag="""$tag$""" icon="""$icon$""" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>\end
\define tag-pill(tag,element-tag:"span",element-attributes:"",actions:"")<span class="tc-tag-list-item"><$macrocall $name="tag-pill-body" tag="""$tag$""" icon={{$tag$!!icon}} colour={{$tag$!!color}} palette={{$:/palette}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/></span>\end
\define tagLabel(tag label)<$set name=LABEL value="""$label$""">{{$tag$||$:/core/ui/TagTemplate}}</$set>\end
Some tiddlers titles are too long to repeat their name in a such a tagpill. It will then work like an old TWC tool that gave every tiddler a dropdown to see what it tags,
\define tag-pill-styles()background-color:$(backgroundColor)$;fill:$(foregroundColor)$;color:$(foregroundColor)$;\end
\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$"""><$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible" style=<<tag-pill-styles>>>$actions$<$transclude tiddler="""$icon$"""/> <$list filter='[{$:/core/macros/tag!!someemptyfield2}!prefix<LABEL>]' emptyMessage='<$view tiddler="""$tag$""" field="title" format="text" />' variable='dummy'><<LABEL>></$list></$element-tag$></$vars>\end
\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)<$macrocall $name="tag-pill-inner" tag="""$tag$""" icon="""$icon$""" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>\end
\define tag-pill(tag,element-tag:"span",element-attributes:"",actions:"")<span class="tc-tag-list-item"><$macrocall $name="tag-pill-body" tag="""$tag$""" icon={{$tag$!!icon}} colour={{$tag$!!color}} palette={{$:/palette}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/></span>\end
\define tag(tag label)