How to link multi tiddlers?

Hi,

I have a menu to link my pet tiddlers

<$link to="cat1" >Cat1</$link>
<$link to="cat2" >Cat3</$link>
<$link to="cat3" >Cat3</$link>
<$link to="dog1" >Dog1</$link>
<$link to="dog2" >Dog2</$link>

I would like to display these tiddlers more simply

<$link to="[tag[cat]]" >My Cats</$link>
<$link to="[tag[dog]]" >My Dogs</$link>

I expect to click “My Cats” will show 3 tiddlers (cat1, cat2 and cat3)

but its not working, only create new tiddler with “[tag[cat]]” of title.

How to link multi tiddlers correct?

You need to use a tool like the list widget to list out the dogs and cats. The link widget will only list one item. However, a quick way to achieve your goal is with the built-in list-links macro:

<<list-links filter:"[tag[cat]]">>
<<list-links filter:"[tag[dog]]">>

but these will generate multi links

I want to click one link and show all tiddlers

like “My Cats” to open all " [tag[cat]] " tiddlers.

Buttons are designed to trigger actions on click;

  • Use a class to make a button look like A link
  • Change the below filter to your cats and/or dogs
  • Scroll=no opens them below
<$button class="tc-btn-invisible tc-tiddlylink">
<$list filter="[tag[dog]] [tag[cat]]">
   <$action-navigate $to=<<currentTiddler>> $scroll=no/>
</$list>
Open
</$button>
2 Likes

Another way is to use a filter inside the url. You can do this with a link tag (not the link widget), like this :

<a href="#:[tag[dog]] [tag[cat]]">my dogs and cats</a>

https://demos.tiddlyhost.com/#Link%20to%20several%20tiddlers

You can also set the tag attribute to “a” in order to make it a proper link :slight_smile:

2 Likes