created: 20150221211317000 modified: 20240228131331605 tags: [[tag Macro]] [[Macro Examples]] title: tag Macro (Examples) type: text/vnd.tiddlywiki <$macrocall $name=".example" n="1" eg="""<>"""/> <$macrocall $name=".example" n="2" eg="""<>"""/> The Following tag can be shown with a font-style: //italic// if the corresponding stylesheet exists. See: [[tag Macro]] <$macrocall $name=".example" n="3" eg="""<>"""/> If a [[list widget|ListWidget]] generates multiple tag macros for the same tag, clicking any of them opens dropdowns on all of them, as in the example below. This is usually unwanted. <$macrocall $name=".example" n="4" eg="""<$list filter="[tag[HelloThere]]"> * <$link/> is tagged with: <$list filter="[tags[]]"> <> """/> Adding the `counter="transclusion"` attribute to the list widget that generates multiple identical tag macros causes each of them to be identified as a unique one. Clicking on any of them opens only a single dropdown. <$macrocall $name=".example" n="5" eg="""<$list filter="[tag[HelloThere]]" counter="transclusion"> * <$link/> is tagged with: <$list filter="[tags[]]"> <> """/> A slightly more performant option is to use the `variable="transclusion"` attribute in the list widget. In this case, the variable `<>` has to be used inside the list widget instead of the `<>` . <$macrocall $name=".example" n="6" eg="""<$list filter="[tag[HelloThere]]" variable="transclusion"> * <$link to=<>/> is tagged with: <$list filter="[tags[]]"> <> """/>